This commit is contained in:
lgbo-ustc 2024-08-15 09:04:22 +08:00
parent 2a51b6c403
commit 690c4d0803

View File

@ -1157,14 +1157,7 @@ void WindowTransform::appendChunk(Chunk & chunk)
// Initialize output columns.
for (auto & ws : workspaces)
{
if (ws.window_function_impl)
block.casted_columns.push_back(ws.window_function_impl->castColumn(block.input_columns, ws.argument_column_indices));
else
{
/// `castColumn` returns nullptr at default, so it's OK to put nullptr as a placeholder here
/// it should not be used in fact.
block.casted_columns.push_back(nullptr);
}
block.casted_columns.push_back(ws.window_function_impl ? ws.window_function_impl->castColumn(block.input_columns, ws.argument_column_indices) : nullptr);
block.output_columns.push_back(ws.aggregate_function->getResultType()
->createColumn());