Skip to content

Commit

Permalink
Make VectorAgg support different child plans
Browse files Browse the repository at this point in the history
Vectorized aggregation assumes that it runs on top of a
DecompressChunk child node, which makes it difficult to support other
child plans; including those that fetch data via Hypercore TAM.

Most of the DecompressChunk-specific code for planning VectorAgg
relates to identifying vectorizable columns. This code is moved to a
separate source file so that the main planning code is mostly
child-node independent.
  • Loading branch information
erimatnor committed Feb 12, 2025
1 parent 6063464 commit 7ac2400
Show file tree
Hide file tree
Showing 8 changed files with 221 additions and 231 deletions.
6 changes: 4 additions & 2 deletions tsl/src/nodes/decompress_chunk/vector_quals.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ typedef struct VectorQualInfo
*/
Index rti;

bool reverse;
/*
* Array indexed by uncompressed attno indicating whether an
* attribute/column is a vectorizable type.
* Arrays indexed by uncompressed attno indicating whether an
* attribute/column is a vectorizable type and/or a segmentby attribute.
*/
bool *vector_attrs;
bool *segmentby_attrs;
} VectorQualInfo;

/*
Expand Down
3 changes: 2 additions & 1 deletion tsl/src/nodes/vector_agg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ set(SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/exec.c
${CMAKE_CURRENT_SOURCE_DIR}/grouping_policy_batch.c
${CMAKE_CURRENT_SOURCE_DIR}/grouping_policy_hash.c
${CMAKE_CURRENT_SOURCE_DIR}/plan.c)
${CMAKE_CURRENT_SOURCE_DIR}/plan.c
${CMAKE_CURRENT_SOURCE_DIR}/plan_decompress_chunk.c)
target_sources(${TSL_LIBRARY_NAME} PRIVATE ${SOURCES})
Loading

0 comments on commit 7ac2400

Please sign in to comment.