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

1. fix decode literal expr error, 2. add all scalar function sig in scalar_func_map #177

Merged
merged 6 commits into from
Aug 14, 2019
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
4 changes: 2 additions & 2 deletions dbms/src/Flash/Coprocessor/DAGDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ try
}
catch (const RegionException & e)
{
e.rethrow();
throw;
}
catch (const LockException & e)
{
e.rethrow();
throw;
}
catch (const Exception & e)
{
Expand Down
11 changes: 5 additions & 6 deletions dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ String DAGExpressionAnalyzer::appendCastIfNeeded(const tipb::Expr & expr, Expres
tipb::Expr type_expr;
type_expr.set_tp(tipb::ExprType::String);
std::stringstream ss;
EncodeCompactBytes(expected_type->getName(), ss);
type_expr.set_val(ss.str());
type_expr.set_val(expected_type->getName());
auto type_field_type = type_expr.field_type();
type_field_type.set_tp(0xfe);
type_field_type.set_flag(1);
Expand Down Expand Up @@ -302,8 +301,8 @@ String DAGExpressionAnalyzer::getActions(const tipb::Expr & expr, ExpressionActi
}
else if (isColumnExpr(expr))
{
ColumnID columnId = getColumnID(expr);
if (columnId < 0 || columnId >= (ColumnID)getCurrentInputColumns().size())
ColumnID column_id = getColumnID(expr);
if (column_id < 0 || column_id >= (ColumnID)getCurrentInputColumns().size())
{
throw Exception("column id out of bound", ErrorCodes::COP_BAD_DAG_REQUEST);
}
Expand Down Expand Up @@ -356,8 +355,8 @@ String DAGExpressionAnalyzer::getActions(const tipb::Expr & expr, ExpressionActi
// should be updated to and(casted_arg1_name, arg2_name)
expr_name = genFuncString(func_name, argument_names);

const ExpressionAction & applyFunction = ExpressionAction::applyFunction(function_builder, argument_names, expr_name);
actions->add(applyFunction);
const ExpressionAction & apply_function = ExpressionAction::applyFunction(function_builder, argument_names, expr_name);
actions->add(apply_function);
// add cast if needed
expr_name = appendCastIfNeeded(expr, actions, expr_name);
return expr_name;
Expand Down
Loading