You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Jackie-Jiang (via GitHub)" <gi...@apache.org> on 2026/06/19 23:56:47 UTC
[PR] Rename PinotDataType.INTEGER to INT for naming consistency [pinot]
Jackie-Jiang opened a new pull request, #18815:
URL: https://github.com/apache/pinot/pull/18815
## Summary
Renames the enum constants `PinotDataType.INTEGER` → `INT` and `INTEGER_ARRAY` → `INT_ARRAY` so the spelling matches `FieldSpec.DataType.INT`, `DataSchema.ColumnDataType.INT`, and the SQL type name. The mismatch (`INTEGER` vs the `INT` everyone else uses) is a recurring source of confusion.
`PinotDataType` is a transient type-conversion helper — it is never persisted by name into segment metadata, ZooKeeper, table config, or the wire protocol (only `FieldSpec.DataType` is, and it is untouched). So the rename carries no serialization or mixed-version compatibility risk.
### Backward compatibility
The only place that resolves a `PinotDataType` from a user-supplied string by name is the `cast` scalar function. `CAST(x AS INTEGER)` previously resolved via the `PinotDataType.valueOf("INTEGER")` default branch. An explicit `case "INTEGER"` alias is added so that literal keeps working (alongside `INT`), and a regression test pins it.
The rest of the change is a mechanical reference update (`PinotDataType.INTEGER` → `INT`, `case INTEGER:` → `case INT:` for `PinotDataType` switches only — Calcite `SqlTypeName`/`SqlTypeFamily` and `java.sql.Types` `INTEGER` references are left intact) plus test-data updates.
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Rename PinotDataType.INTEGER to INT for naming consistency [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang merged PR #18815:
URL: https://github.com/apache/pinot/pull/18815
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Rename PinotDataType.INTEGER to INT for naming consistency [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #18815:
URL: https://github.com/apache/pinot/pull/18815#issuecomment-4755747527
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/18815?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `72.72727%` with `6 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 56.98%. Comparing base ([`648d285`](https://app.codecov.io/gh/apache/pinot/commit/648d285840da4e3b9922477e67227f0d8944e2e4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1cbf7c4`](https://app.codecov.io/gh/apache/pinot/commit/1cbf7c4d31f897f036d25c06afa54b0fa7e2f577?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/18815?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...java/org/apache/pinot/spi/utils/PinotDataType.java](https://app.codecov.io/gh/apache/pinot/pull/18815?src=pr&el=tree&filepath=pinot-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fspi%2Futils%2FPinotDataType.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvdXRpbHMvUGlub3REYXRhVHlwZS5qYXZh) | 72.72% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/18815?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...l/columntransformer/DataTypeColumnTransformer.java](https://app.codecov.io/gh/apache/pinot/pull/18815?src=pr&el=tree&filepath=pinot-segment-local%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fsegment%2Flocal%2Fcolumntransformer%2FDataTypeColumnTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9jb2x1bW50cmFuc2Zvcm1lci9EYXRhVHlwZUNvbHVtblRyYW5zZm9ybWVyLmphdmE=) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/18815?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...e/pinot/common/request/context/LiteralContext.java](https://app.codecov.io/gh/apache/pinot/pull/18815?src=pr&el=tree&filepath=pinot-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcommon%2Frequest%2Fcontext%2FLiteralContext.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vcmVxdWVzdC9jb250ZXh0L0xpdGVyYWxDb250ZXh0LmphdmE=) | 50.00% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/pinot/pull/18815?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
> :exclamation: There is a different number of reports uploaded between BASE (648d285) and HEAD (1cbf7c4). Click for more details.
>
> <details><summary>HEAD has 16 uploads less than BASE</summary>
>
>| Flag | BASE (648d285) | HEAD (1cbf7c4) |
>|------|------|------|
>|java-21|5|1|
>|unittests|2|1|
>|temurin|5|1|
>|unittests2|1|0|
>|integration|3|0|
>|integration1|1|0|
>|integration2|1|0|
>|custom-integration1|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #18815 +/- ##
============================================
- Coverage 64.80% 56.98% -7.82%
+ Complexity 1319 1 -1318
============================================
Files 3388 2599 -789
Lines 210228 151683 -58545
Branches 32948 24567 -8381
============================================
- Hits 136229 86433 -49796
+ Misses 63028 57912 -5116
+ Partials 10971 7338 -3633
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/18815/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/18815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration](https://app.codecov.io/gh/apache/pinot/pull/18815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/18815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/18815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-21](https://app.codecov.io/gh/apache/pinot/pull/18815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.98% <72.72%> (-7.82%)` | :arrow_down: |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/18815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.98% <72.72%> (-7.82%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/18815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.98% <72.72%> (-7.82%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/18815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.98% <72.72%> (-0.01%)` | :arrow_down: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/18815/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/pinot/pull/18815?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Rename PinotDataType.INTEGER to INT for naming consistency [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Rename PinotDataType.INTEGER to INT for naming consistency [pinot]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #18815:
URL: https://github.com/apache/pinot/pull/18815#discussion_r3444998116
##########
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:
Renaming/removing enum constants in `pinot-spi` is a source- and binary-incompatible change for any downstream code that references `PinotDataType.INTEGER`/`INTEGER_ARRAY` (including plugins built against older Pinot). If this is intended, it should be explicitly called out and coordinated with release/versioning; otherwise consider keeping the old constants as `@Deprecated` aliases for at least one release cycle.
##########
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:
`cast()` uppercases `targetTypeLiteral` using the default locale (`toUpperCase()`), which is locale-sensitive and can break type resolution in locales like Turkish (e.g., "int" -> "İNT"). Since this PR is already touching the cast type-literal mapping, it’s a good opportunity to make the normalization locale-independent (use `Locale.ROOT`).
--
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: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org