Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface changes for the serialized hashing strategy #7657

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tsl/src/nodes/vector_agg/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,15 @@ get_input_offset(const CustomScanState *state, const Var *var)
return index;
}

static int
get_value_bytes(const CustomScanState *state, int input_offset)
static void
get_column_storage_properties(const CustomScanState *state, int input_offset,
GroupingColumn *result)
{
const DecompressChunkState *decompress_state = (DecompressChunkState *) state;
const DecompressContext *dcontext = &decompress_state->decompress_context;
const CompressionColumnDescription *desc = &dcontext->compressed_chunk_columns[input_offset];
return desc->value_bytes;
result->value_bytes = desc->value_bytes;
result->by_value = desc->by_value;
}

static void
Expand Down Expand Up @@ -187,7 +189,7 @@ vector_agg_begin(CustomScanState *node, EState *estate, int eflags)

Var *var = castNode(Var, tlentry->expr);
col->input_offset = get_input_offset(childstate, var);
col->value_bytes = get_value_bytes(childstate, col->input_offset);
get_column_storage_properties(childstate, col->input_offset, col);
}
}

Expand Down
4 changes: 3 additions & 1 deletion tsl/src/nodes/vector_agg/exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ typedef struct GroupingColumn
{
int input_offset;
int output_offset;
int value_bytes;

int16 value_bytes;
bool by_value;
} GroupingColumn;

typedef struct VectorAggState
Expand Down
Loading