xiangfu0 commented on code in PR #18871:
URL: https://github.com/apache/pinot/pull/18871#discussion_r3642742247


##########
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:
   Done — `case UUID` now follows `case BYTES` in all three Arrow switches 
(field creation, encode, decode), and `case UUID_ARRAY` follows `case 
BYTES_ARRAY` in the three list-vector groups. Same ordering applied in 
`JsonResponseEncoder`. All are shared fall-through branches, so this is 
behavior-neutral.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



##########
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:
   Done. `ColumnDataType.UUID` is declared directly after `BYTES`, and 
`UUID_ARRAY` after `BYTES_ARRAY`.
   
   My earlier pass only reordered the enum declaration. This one also covers 
the eight switches inside `ColumnDataType` where `case UUID` still preceded 
`case BYTES`: `toDataType`, `toInternal` (including the `OBJECT` instanceof 
chain), `toExternal`, `convert`, `format`, `convertAndFormat`, `fromDataTypeSV` 
and `fromDataTypeMV`. Each is an independent branch with its own `return`, so 
the reordering is behavior-neutral.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_



-- 
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]

Reply via email to