Skip to content

Commit

Permalink
[CH-402]Enable return null and complex type for get_json_object funct…
Browse files Browse the repository at this point in the history
…ion (#403)
  • Loading branch information
KevinyhZou authored Apr 10, 2023
1 parent 3028f6b commit 876a30d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils/local-engine/Common/CHUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,8 @@ void BackendInitializerUtil::initSettings()
settings.set("input_format_orc_case_insensitive_column_matching", true);
settings.set("input_format_parquet_allow_missing_columns", true);
settings.set("input_format_parquet_case_insensitive_column_matching", true);
settings.set("function_json_value_return_type_allow_complex", true);
settings.set("function_json_value_return_type_allow_nullable", true);
}

void BackendInitializerUtil::initContexts()
Expand Down
4 changes: 4 additions & 0 deletions utils/local-engine/Parser/SerializedPlanParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,10 @@ const ActionsDAG::Node * SerializedPlanParser::parseFunctionWithDAG(
SerializedPlanParser::parseType(rel.scalar_function().output_type())->getName(),
function_node->result_name);
}
if (function_name == "JSON_VALUE")
{
result_node->function->setResolver(function_builder);
}
if (keep_result)
actions_dag->addOrReplaceInOutputs(*result_node);
}
Expand Down

0 comments on commit 876a30d

Please sign in to comment.