Skip to content

Commit

Permalink
Merge pull request #24812 from oleiman/dlib/core-8781/json-single-val…
Browse files Browse the repository at this point in the history
…ue-serde

iceberg: Single-value JSON serde
  • Loading branch information
oleiman authored Jan 17, 2025
2 parents 5615542 + e13f753 commit 2e246e9
Show file tree
Hide file tree
Showing 7 changed files with 1,696 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/v/iceberg/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,29 @@ redpanda_cc_library(
],
)

redpanda_cc_library(
name = "values_json",
srcs = [
"values_json.cc",
],
hdrs = [
"values_json.h",
],
include_prefix = "iceberg",
deps = [
":datatypes",
":json_utils",
":json_writer",
":values",
"//src/v/json",
"//src/v/strings:string_switch",
"@abseil-cpp//absl/strings",
"@abseil-cpp//absl/time",
"@boost//:iostreams",
"@boost//:range",
],
)

redpanda_cc_library(
name = "field_collecting_visitor",
hdrs = [
Expand Down
1 change: 1 addition & 0 deletions src/v/iceberg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ v_cc_library(
values.cc
values_avro.cc
values_bytes.cc
values_json.cc
rest_client/json.cc
rest_client/retry_policy.cc
rest_client/catalog_client.cc
Expand Down
19 changes: 19 additions & 0 deletions src/v/iceberg/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,25 @@ redpanda_cc_gtest(
],
)

redpanda_cc_gtest(
name = "values_json_test",
timeout = "short",
srcs = [
"values_json_test.cc",
],
deps = [
":test_schemas",
"//src/v/bytes:random",
"//src/v/iceberg:json_writer",
"//src/v/iceberg:values",
"//src/v/iceberg:values_json",
"//src/v/json",
"//src/v/test_utils:gtest",
"@abseil-cpp//absl/numeric:int128",
"@googletest//:gtest",
],
)

redpanda_cc_gtest(
name = "filesystem_catalog_test",
timeout = "short",
Expand Down
11 changes: 11 additions & 0 deletions src/v/iceberg/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ rp_test(
ARGS "-- -c1"
)

rp_test(
UNIT_TEST
GTEST
BINARY_NAME iceberg_values_json
SOURCES
values_json_test.cc
LIBRARIES
v::gtest_main
v::iceberg_test_utils
)

rp_test(
BENCHMARK_TEST
BINARY_NAME iceberg_uri
Expand Down
Loading

0 comments on commit 2e246e9

Please sign in to comment.