Skip to content

Commit

Permalink
Fix Build due to ClickHouse/ClickHouse#68534
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaichen committed Aug 23, 2024
1 parent 72e29bc commit 2364f5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp-ch/local-engine/Functions/SparkFunctionGetJsonObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class GetJsonObjectImpl
public:
using Element = typename JSONParser::Element;

static DB::DataTypePtr getReturnType(const char *, const DB::ColumnsWithTypeAndName &, const DB::ContextPtr &)
static DB::DataTypePtr getReturnType(const char *, const DB::ColumnsWithTypeAndName &, bool )
{
auto nested_type = std::make_shared<DB::DataTypeString>();
return std::make_shared<DB::DataTypeNullable>(nested_type);
Expand All @@ -81,7 +81,7 @@ class GetJsonObjectImpl
static size_t getNumberOfIndexArguments(const DB::ColumnsWithTypeAndName & arguments) { return arguments.size() - 1; }

bool insertResultToColumn(
DB::IColumn & dest, const Element & root, DB::GeneratorJSONPath<JSONParser> & generator_json_path, const DB::ContextPtr &)
DB::IColumn & dest, const Element & root, DB::GeneratorJSONPath<JSONParser> & generator_json_path, bool )
{
Element current_element = root;
DB::VisitorStatus status;
Expand Down Expand Up @@ -353,7 +353,7 @@ class FlattenJSONStringOnRequiredFunction : public DB::IFunction
for (size_t j = 0; j < tuple_size; ++j)
{
generator_json_paths[j]->reinitialize();
if (!impl.insertResultToColumn(*tuple_columns[j], document, *generator_json_paths[j], context))
if (!impl.insertResultToColumn(*tuple_columns[j], document, *generator_json_paths[j], true))
{
tuple_columns[j]->insertDefault();
}
Expand Down

0 comments on commit 2364f5a

Please sign in to comment.