8000 Fix SHOW and SET bugs by JinHai-CN · Pull Request #1474 · infiniflow/infinity · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix SHOW and SET bugs #1474

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”, y 8000 ou 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

Merged
merged 1 commit into from
Jul 13, 2024
Merged
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
7 changes: 6 additions & 1 deletion src/executor/operator/physical_command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ bool PhysicalCommand::Execute(QueryContext *query_context, OperatorState *operat
Status status = Status::DataTypeMismatch("Integer", set_command->value_type_str());
RecoverableError(status);
}
query_context->storage()->catalog()->ResizeProfileHistory(set_command->value_int());
i32 value_int = set_command->value_int();
if(value_int < 0) {
Status status = Status::InvalidCommand(fmt::format("Try to set profile record capacity with invalid value {}", value_int));
RecoverableError(status);
}
query_context->storage()->catalog()->ResizeProfileHistory(value_int);
return true;
}
case GlobalVariable::kInvalid: {
Expand Down
21 changes: 21 additions & 0 deletions src/executor/operator/physical_show.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2102,6 +2102,11 @@ void PhysicalShow::ExecuteShowBlockColumn(QueryContext *query_context, ShowOpera
}

SizeT column_count = table_entry->ColumnCount();
if(!column_id_.has_value()) {
String error_message = "No column id is given.";
UnrecoverableError(error_message);
return;
}
SizeT table_column_id = *column_id_;

if (table_column_id >= column_count) {
Expand Down Expand Up @@ -4695,6 +4700,22 @@ void PhysicalShow::ExecuteShowTransaction(QueryContext *query_context, ShowOpera
value_expr.AppendToChunk(output_block_ptr->column_vectors[column_id]);
}

++column_id;
{
Value value = Value::MakeVarchar(std::to_string(*txn_id_));
ValueExpression value_expr(value);
value_expr.AppendToChunk(output_block_ptr->column_vectors[column_id]);
}
}

{
SizeT column_id = 0;
{
Value value = Value::MakeVarchar("session_id");
ValueExpression value_expr(value);
value_expr.AppendToChunk(output_block_ptr->column_vectors[column_id]);
}

++column_id;
{
Value value = Value::MakeVarchar(std::to_string(*session_id_));
Expand Down
1 change: 1 addition & 0 deletions src/planner/logical_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,7 @@ Status LogicalPlanner::BuildShowBlockColumn(const ShowStatement *statement, Shar
bind_context_ptr->GenerateTableIndex(),
statement->segment_id_,
statement->block_id_,
statement->chunk_id_,
statement->column_id_);

this->logical_plan_ = logical_show;
Expand Down
Loading
0