Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
zhli1142015 committed Dec 13, 2024
1 parent 1ef2f81 commit c3696df
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions velox/functions/sparksql/specialforms/FromJson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace {

/// Struct for extracting JSON data and writing it with type-specific handling.
template <typename Input>
struct ExtractJsonTypedImpl {
struct ExtractJsonTypeImpl {
template <TypeKind kind>
static simdjson::error_code
apply(Input input, exec::GenericWriter& writer, bool isRoot) {
Expand Down Expand Up @@ -156,7 +156,7 @@ struct ExtractJsonTypedImpl {
writerTyped.add_null();
} else {
SIMDJSON_TRY(VELOX_DYNAMIC_TYPE_DISPATCH(
ExtractJsonTypedImpl<simdjson::ondemand::value>::apply,
ExtractJsonTypeImpl<simdjson::ondemand::value>::apply,
elementType->kind(),
element,
writerTyped.add_item(),
Expand All @@ -165,7 +165,7 @@ struct ExtractJsonTypedImpl {
}
} else if (elementType->kind() == TypeKind::ROW && isRoot) {
SIMDJSON_TRY(VELOX_DYNAMIC_TYPE_DISPATCH(
ExtractJsonTypedImpl<simdjson::ondemand::value>::apply,
ExtractJsonTypeImpl<simdjson::ondemand::value>::apply,
elementType->kind(),
value,
writerTyped.add_item(),
Expand Down Expand Up @@ -195,7 +195,7 @@ struct ExtractJsonTypedImpl {
auto writers = writerTyped.add_item();
std::get<0>(writers).castTo<Varchar>().append(key);
SIMDJSON_TRY(VELOX_DYNAMIC_TYPE_DISPATCH(
ExtractJsonTypedImpl<simdjson::ondemand::value>::apply,
ExtractJsonTypeImpl<simdjson::ondemand::value>::apply,
valueType->kind(),
field.value(),
std::get<1>(writers),
Expand Down Expand Up @@ -242,7 +242,7 @@ struct ExtractJsonTypedImpl {
it->second = -1;

auto res = VELOX_DYNAMIC_TYPE_DISPATCH(
ExtractJsonTypedImpl<simdjson::ondemand::value>::apply,
ExtractJsonTypeImpl<simdjson::ondemand::value>::apply,
rowType.childAt(index)->kind(),
field.value(),
writerTyped.get_writer_at(index),
Expand Down Expand Up @@ -464,7 +464,7 @@ class FromJsonFunction final : public exec::VectorFunction {
writer.commitNull();
} else {
SIMDJSON_TRY(
ExtractJsonTypedImpl<simdjson::ondemand::document&>::apply<kind>(
ExtractJsonTypeImpl<simdjson::ondemand::document&>::apply<kind>(
doc, writer.current(), true));
writer.commit(true);
}
Expand Down

0 comments on commit c3696df

Please sign in to comment.