Jackie-Jiang commented on code in PR #18871:
URL: https://github.com/apache/pinot/pull/18871#discussion_r3547813591
##########
pinot-common/src/main/java/org/apache/pinot/common/response/encoder/ArrowResponseEncoder.java:
##########
@@ -231,11 +235,12 @@ private VectorSchemaRoot
createVectorSchemaRoot(ResultTable resultTable, DataSch
break;
case BIG_DECIMAL:
case TIMESTAMP:
+ case UUID:
case STRING:
case JSON:
case BYTES:
case OBJECT:
- byte[] bytes = ((String) value).getBytes(StandardCharsets.UTF_8);
+ byte[] bytes = getVarCharValue(colType,
value).getBytes(StandardCharsets.UTF_8);
Review Comment:
Is this a bug fix?
##########
pinot-common/src/main/java/org/apache/pinot/common/response/encoder/ArrowResponseEncoder.java:
##########
@@ -104,6 +106,7 @@ private VectorSchemaRoot createVectorSchemaRoot(ResultTable
resultTable, DataSch
break;
case BIG_DECIMAL:
case TIMESTAMP:
+ case UUID:
Review Comment:
Fix the ordering. Same for other places
##########
pinot-common/src/main/java/org/apache/pinot/common/utils/DataSchema.java:
##########
@@ -303,6 +324,16 @@ public RelDataType toType(RelDataTypeFactory typeFactory) {
return typeFactory.createSqlType(SqlTypeName.MAP);
}
},
+ // NOTE: UUID is placed before OBJECT and the array types, shifting their
ordinals by +1 relative to any build that
+ // does not contain this enum constant. This is safe because DataSchema
serialization uses enum names (not ordinals)
+ // via ColumnDataType.name() / ColumnDataType.valueOf(). If ordinal-based
serialization is ever added for
+ // ColumnDataType, UUID must be moved to the end of the enum (as was done
for FieldSpec.DataType.UUID).
+ UUID(BYTES, null) {
Review Comment:
Put it after `BYTES` for consistency. Same for other places
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]