-
Notifications
You must be signed in to change notification settings - Fork 891
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f7e9c4
commit c835fa8
Showing
11 changed files
with
220 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Add all *.c to sources in upperlevel directory | ||
set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/decompress_chunk_vector.c) | ||
set(SOURCES | ||
${CMAKE_CURRENT_SOURCE_DIR}/decompress_chunk_vector.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/exec.c ${CMAKE_CURRENT_SOURCE_DIR}/planner.c) | ||
target_sources(${TSL_LIBRARY_NAME} PRIVATE ${SOURCES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* This file and its contents are licensed under the Timescale License. | ||
* Please see the included NOTICE for copyright information and | ||
* LICENSE-TIMESCALE for a copy of the license. | ||
*/ | ||
|
||
#include <postgres.h> | ||
#include <miscadmin.h> | ||
#include <access/sysattr.h> | ||
#include <executor/executor.h> | ||
#include <nodes/bitmapset.h> | ||
#include <nodes/makefuncs.h> | ||
#include <nodes/nodeFuncs.h> | ||
#include <parser/parsetree.h> | ||
#include <rewrite/rewriteManip.h> | ||
#include <utils/builtins.h> | ||
#include <utils/datum.h> | ||
#include <utils/memutils.h> | ||
#include <utils/typcache.h> | ||
|
||
#include "compat/compat.h" | ||
#include "compression/array.h" | ||
#include "compression/compression.h" | ||
#include "nodes/decompress_chunk_vector/exec.h" | ||
#include "ts_catalog/hypertable_compression.h" | ||
|
||
static TupleTableSlot *decompress_chunk_vector_exec(CustomScanState *node); | ||
static void decompress_chunk_vector_begin(CustomScanState *node, EState *estate, int eflags); | ||
static void decompress_chunk_vector_end(CustomScanState *node); | ||
static void decompress_chunk_vector_rescan(CustomScanState *node); | ||
static void decompress_chunk_vector_explain(CustomScanState *node, List *ancestors, | ||
ExplainState *es); | ||
|
||
static CustomExecMethods decompress_chunk_vector_state_methods = { | ||
.BeginCustomScan = decompress_chunk_vector_begin, | ||
.ExecCustomScan = decompress_chunk_vector_exec, | ||
.EndCustomScan = decompress_chunk_vector_end, | ||
.ReScanCustomScan = decompress_chunk_vector_rescan, | ||
.ExplainCustomScan = decompress_chunk_vector_explain, | ||
}; | ||
|
||
static TupleTableSlot * | ||
decompress_chunk_vector_exec(CustomScanState *node) | ||
{ | ||
return NULL; | ||
} | ||
|
||
static void | ||
decompress_chunk_vector_begin(CustomScanState *node, EState *estate, int eflags) | ||
{ | ||
} | ||
|
||
static void | ||
decompress_chunk_vector_end(CustomScanState *node) | ||
{ | ||
} | ||
|
||
static void | ||
decompress_chunk_vector_rescan(CustomScanState *node) | ||
{ | ||
} | ||
|
||
static void | ||
decompress_chunk_vector_explain(CustomScanState *node, List *ancestors, ExplainState *es) | ||
{ | ||
} | ||
|
||
Node * | ||
decompress_chunk_vector_state_create(CustomScan *cscan) | ||
{ | ||
DecompressChunkVectorState *chunk_state; | ||
chunk_state = (DecompressChunkVectorState *) newNode(sizeof(DecompressChunkVectorState), | ||
T_CustomScanState); | ||
chunk_state->csstate.methods = &decompress_chunk_vector_state_methods; | ||
return (Node *) chunk_state; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* This file and its contents are licensed under the Timescale License. | ||
* Please see the included NOTICE for copyright information and | ||
* LICENSE-TIMESCALE for a copy of the license. | ||
*/ | ||
|
||
#ifndef TIMESCALEDB_DECOMPRESS_VECTOR_CHUNK_EXEC_H | ||
#define TIMESCALEDB_DECOMPRESS_VECTOR_CHUNK_EXEC_H | ||
|
||
#include <postgres.h> | ||
|
||
typedef struct DecompressChunkVectorState | ||
{ | ||
CustomScanState csstate; | ||
} DecompressChunkVectorState; | ||
|
||
extern Node *decompress_chunk_vector_state_create(CustomScan *cscan); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* This file and its contents are licensed under the Timescale License. | ||
* Please see the included NOTICE for copyright information and | ||
* LICENSE-TIMESCALE for a copy of the license. | ||
*/ | ||
|
||
#include <postgres.h> | ||
#include <access/sysattr.h> | ||
#include <catalog/pg_namespace.h> | ||
#include <catalog/pg_operator.h> | ||
#include <nodes/bitmapset.h> | ||
#include <nodes/extensible.h> | ||
#include <nodes/makefuncs.h> | ||
#include <nodes/nodeFuncs.h> | ||
#include <optimizer/optimizer.h> | ||
#include <optimizer/paths.h> | ||
#include <optimizer/plancat.h> | ||
#include <optimizer/restrictinfo.h> | ||
#include <optimizer/tlist.h> | ||
#include <parser/parsetree.h> | ||
#include <utils/builtins.h> | ||
#include <utils/typcache.h> | ||
|
||
#include "nodes/decompress_chunk_vector/decompress_chunk_vector.h" | ||
#include "nodes/decompress_chunk_vector/planner.h" | ||
#include "nodes/decompress_chunk_vector/exec.h" | ||
#include "utils.h" | ||
|
||
static CustomScanMethods decompress_chunk_plan_methods = { | ||
.CustomName = "DecompressChunk (Vector)", | ||
.CreateCustomScanState = decompress_chunk_vector_state_create, | ||
}; | ||
|
||
void | ||
_decompress_chunk_vector_init(void) | ||
{ | ||
TryRegisterCustomScanMethods(&decompress_chunk_plan_methods); | ||
} | ||
|
||
Plan * | ||
decompress_chunk_vector_plan_create(PlannerInfo *root, RelOptInfo *rel, CustomPath *path) | ||
{ | ||
DecompressChunkVectorPath *dcpath = (DecompressChunkVectorPath *) path; | ||
CustomScan *decompress_plan = makeNode(CustomScan); | ||
|
||
// TODO: Copy information from path to plan | ||
Assert(dcpath); | ||
|
||
decompress_plan->methods = &decompress_chunk_plan_methods; | ||
|
||
return &decompress_plan->scan.plan; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* This file and its contents are licensed under the Timescale License. | ||
* Please see the included NOTICE for copyright information and | ||
* LICENSE-TIMESCALE for a copy of the license. | ||
*/ | ||
|
||
#ifndef TIMESCALEDB_DECOMPRESS_CHUNK_VECTOR_PLANNER_H | ||
#define TIMESCALEDB_DECOMPRESS_CHUNK_VECTOR_PLANNER_H | ||
|
||
#include <postgres.h> | ||
|
||
extern Plan *decompress_chunk_vector_plan_create(PlannerInfo *root, RelOptInfo *rel, | ||
CustomPath *path); | ||
|
||
extern void _decompress_chunk_vector_init(void); | ||
|
||
#endif |