Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ private VectorSchemaRoot createVectorSchemaRoot(ResultTable resultTable, DataSch
case STRING:
case JSON:
case BYTES:
case UUID:
case OBJECT:
field = new Field(colName, FieldType.nullable(new ArrowType.Utf8()), null);
vector = new VarCharVector(colName, ALLOCATOR);
Expand Down Expand Up @@ -181,6 +182,7 @@ private VectorSchemaRoot createVectorSchemaRoot(ResultTable resultTable, DataSch
case TIMESTAMP_ARRAY:
case STRING_ARRAY:
case BYTES_ARRAY:
case UUID_ARRAY:
// Define the inner field for a string element.
children = List.of(new Field("element", FieldType.nullable(new ArrowType.Utf8()), null));
// Define the field for the list column.
Expand Down Expand Up @@ -234,6 +236,7 @@ private VectorSchemaRoot createVectorSchemaRoot(ResultTable resultTable, DataSch
case STRING:
case JSON:
case BYTES:
case UUID:
case OBJECT:
byte[] bytes = ((String) value).getBytes(StandardCharsets.UTF_8);
((VarCharVector) vector).setSafe(rowIndex, bytes);
Expand Down Expand Up @@ -345,6 +348,7 @@ private VectorSchemaRoot createVectorSchemaRoot(ResultTable resultTable, DataSch
case TIMESTAMP_ARRAY:
case STRING_ARRAY:
case BYTES_ARRAY:
case UUID_ARRAY:
ListVector listVector = (ListVector) vector;
String[] stringArray = (String[]) value;
// Start a new list entry for the current row.
Expand Down Expand Up @@ -411,6 +415,7 @@ public ResultTable decodeResultTable(byte[] bytes, int rowSize, DataSchema schem
case STRING:
case JSON:
case BYTES:
case UUID:
case OBJECT:
row[col] = new String(((VarCharVector) vector).get(i), StandardCharsets.UTF_8);
break;
Expand Down Expand Up @@ -469,6 +474,7 @@ public ResultTable decodeResultTable(byte[] bytes, int rowSize, DataSchema schem
case TIMESTAMP_ARRAY:
case STRING_ARRAY:
case BYTES_ARRAY:
case UUID_ARRAY:
ListVector listVector = (ListVector) vector;
List<?> arrayValues = listVector.getObject(i);
String[] array = new String[arrayValues.size()];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ private static Object extractArray(DataSchema.ColumnDataType columnDataType, Jso
case TIMESTAMP_ARRAY:
case STRING_ARRAY:
case BYTES_ARRAY:
case UUID_ARRAY:
String[] stringArray = new String[jsonValue.size()];
for (int k = 0; k < jsonValue.size(); k++) {
stringArray[k] = jsonValue.get(k).textValue();
Expand Down Expand Up @@ -224,6 +225,7 @@ private static Object extractValue(DataSchema.ColumnDataType columnDataType, Jso
case STRING:
case JSON:
case BYTES:
case UUID:
case OBJECT:
return jsonValue.textValue();
case UNKNOWN:
Expand Down
Loading
Loading