Skip to content

Commit

Permalink
Change map type's key from "name" to "key"
Browse files Browse the repository at this point in the history
  • Loading branch information
jphalip committed Dec 23, 2022
1 parent c0e150f commit fe73933
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public class KeyValueObjectInspector extends StandardStructObjectInspector {

// TODO: Maybe make these customizable via configuration:
public static final String KEY_FIELD_NAME = "name";
public static final String KEY_FIELD_NAME = "key";
public static final String VALUE_FIELD_NAME = "value";

KeyValueObjectInspector(ObjectInspector keyOI, ObjectInspector valueOI) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ public class TestUtils {
Stream.of(
"CREATE OR REPLACE TABLE ${dataset}." + MAP_TABLE_NAME + " (",
"id INT64,",
"map_of_ints ARRAY<STRUCT<name STRING, value INT64>>,",
"map_of_structs ARRAY<STRUCT<name STRING, value STRUCT<color STRING>>>,",
"map_of_arrays ARRAY<STRUCT<name STRING, value ARRAY<INT64>>>",
"map_of_ints ARRAY<STRUCT<key STRING, value INT64>>,",
"map_of_structs ARRAY<STRUCT<key STRING, value STRUCT<color STRING>>>,",
"map_of_arrays ARRAY<STRUCT<key STRING, value ARRAY<INT64>>>",
")")
.collect(Collectors.joining("\n"));

Expand All @@ -102,7 +102,7 @@ public class TestUtils {
"int_arr ARRAY<int64>,",
"int_struct_arr ARRAY<STRUCT<i INT64>>,",
"float_struct STRUCT<float_field FLOAT64>,",
"mp ARRAY<STRUCT<name STRING, value ARRAY<STRUCT<name STRING, value INT64>>>>",
"mp ARRAY<STRUCT<key STRING, value ARRAY<STRUCT<key STRING, value INT64>>>>",
")")
.collect(Collectors.joining("\n"));

Expand Down Expand Up @@ -135,7 +135,7 @@ public class TestUtils {
"nums STRUCT<min NUMERIC, max NUMERIC, pi NUMERIC, big_pi NUMERIC>,",
"int_arr ARRAY<int64>,",
"int_struct_arr ARRAY<STRUCT<i INT64>>,",
"mp ARRAY<STRUCT<name STRING, value ARRAY<STRUCT<name STRING, value INT64>>>>",
"mp ARRAY<STRUCT<key STRING, value ARRAY<STRUCT<key STRING, value INT64>>>>",
")")
.collect(Collectors.joining("\n"));

Expand Down

0 comments on commit fe73933

Please sign in to comment.