Jackie-Jiang commented on code in PR #18400:
URL: https://github.com/apache/pinot/pull/18400#discussion_r3180030237


##########
pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordReaderConfig.java:
##########
@@ -20,17 +20,16 @@
 
 import org.apache.pinot.spi.data.readers.RecordReaderConfig;
 
-/**
- * Config for {@link AvroRecordReader}
- */
+
+/// Config for [AvroRecordReader]. See [AvroRecordExtractorConfig] for the 
meaning of `extractRawTimeValues`.
 public class AvroRecordReaderConfig implements RecordReaderConfig {
-  private boolean _enableLogicalTypes = true;
+  private boolean _extractRawTimeValues;
 
-  public boolean isEnableLogicalTypes() {
-    return _enableLogicalTypes;
+  public boolean isExtractRawTimeValues() {
+    return _extractRawTimeValues;
   }
 
-  public void setEnableLogicalTypes(boolean enableLogicalTypes) {
-    _enableLogicalTypes = enableLogicalTypes;
+  public void setExtractRawTimeValues(boolean extractRawTimeValues) {
+    _extractRawTimeValues = extractRawTimeValues;
   }

Review Comment:
   Acknowledged as a deliberate breaking change. The old 
`enableLogicalTypes=false` was a global switch that turned off DECIMAL and UUID 
along with TIMESTAMP / DATE / TIME — but DECIMAL is meaningless without 
scale/precision-driven conversion (raw bytes can't be interpreted) and UUID is 
meaningless without canonical-form decoding. So `enableLogicalTypes=false` was 
never really a usable mode for those types; users who set it generally meant 
"give me raw timestamp/date/time integers," not "break my decimals."
   
   The new `extractRawTimeValues` flag is finer-grained — it opts out of 
TIMESTAMP / DATE / TIME only, with DECIMAL and UUID always converted. Adding a 
compat alias from `enableLogicalTypes=false` to `extractRawTimeValues=true` 
would silently flip DECIMAL/UUID behavior for any existing user who set the old 
flag, which is its own surprise. A clean rename forces an explicit migration 
decision rather than papering over the semantic difference.



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