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


##########
pinot-plugins/pinot-input-format/pinot-arrow/src/main/java/org/apache/pinot/plugin/inputformat/arrow/ArrowToPinotTypeConverter.java:
##########
@@ -59,6 +61,40 @@ public final class ArrowToPinotTypeConverter {
   private ArrowToPinotTypeConverter() {
   }
 
+  /// Returns the [PinotDataType] that a column with the given Arrow element 
[Types.MinorType] can be read as through a
+  /// type-specific `ColumnReader` accessor, or `null` when it has no 
dedicated accessor and must be read through
+  /// `ColumnReader.getValue()`. `singleValue` selects the scalar vs `_ARRAY` 
variant.
+  ///
+  /// The `MinorType` already encodes every distinction the accessors care 
about, so a plain switch suffices: only
+  /// signed 32/64-bit ints (`INT` / `BIGINT`), single/double floats, 128-bit 
`DECIMAL`, `VARCHAR`, and `VARBINARY`
+  /// have accessors. Everything else — unsigned/narrow ints, half floats, 
`DECIMAL256`, `LARGEVARCHAR` /
+  /// `LARGEVARBINARY` / fixed-size binary, `BIT` (boolean), temporal, and 
complex types — is a distinct `MinorType`
+  /// that falls through to `null` and is read via `getValue()`.

Review Comment:
   Fixed — the doc now refers to `getValue(int)` in both places.
   



##########
pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/readers/InMemoryColumnReader.java:
##########
@@ -202,6 +84,11 @@ public boolean isNull(int docId) {
     return _isNull[docId];
   }
 
+  @Override
+  public Object getValue(int docId) {
+    return _values[docId];
+  }

Review Comment:
   Fixed. `getValue(int)` now boxes primitive multi-value arrays (`int[]` / 
`long[]` / …) to `Object[]` per the SPI contract, matching what the real 
readers (e.g. `ArrowColumnReader`) return for list columns. Single values, 
`null`, and values that are already `Object[]` (`BigDecimal[]` / `String[]` / 
`byte[][]`) pass through unchanged.
   



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