Jackie-Jiang commented on code in PR #18815:
URL: https://github.com/apache/pinot/pull/18815#discussion_r3445028409
##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/DataTypeConversionFunctions.java:
##########
@@ -62,10 +62,10 @@ public static Object cast(Object value, String
targetTypeLiteral) {
case "DECIMAL":
targetDataType = BIG_DECIMAL;
break;
- case "INT":
+ case "INTEGER":
case "UTINYINT":
case "USMALLINT":
- targetDataType = INTEGER;
+ targetDataType = INT;
break;
Review Comment:
This `toUpperCase()` is pre-existing and unrelated to the rename, so I'm
keeping this PR scoped to the rename rather than mixing in a behavior fix.
Agree it should use `Locale.ROOT` — I'll address the locale-safe normalization
in a separate PR.
##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/PinotDataType.java:
##########
@@ -264,7 +264,7 @@ public byte[] toBytes(Object value) {
}
},
- INTEGER {
+ INT {
Review Comment:
`PinotDataType` is an internal type-conversion helper, not a persisted or
wire-format type — only `FieldSpec.DataType` / `DataSchema.ColumnDataType` are
serialized — so renaming a constant carries no data/format compatibility impact.
A `@Deprecated` alias isn't possible for an enum constant: `INTEGER` can't
be made a synonym of `INT`, it would be a distinct constant with no value.
Downstream code referencing `PinotDataType.INTEGER` directly needs a one-line
update; the rename is intentional to align with `FieldSpec.DataType.INT` /
`ColumnDataType.INT` / SQL naming.
--
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]