You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/10/07 16:58:36 UTC

[GitHub] [pinot] ddcprg commented on a change in pull request #7358: [issue-7357] Add support for Avro logical types in realtime ingestion

ddcprg commented on a change in pull request #7358:
URL: https://github.com/apache/pinot/pull/7358#discussion_r724367933



##########
File path: pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroRecordExtractor.java
##########
@@ -107,4 +107,23 @@ protected Object convertRecord(Object value) {
     }
     return convertedMap;
   }
+
+  /**
+   * This method convert any Avro logical-type converted (or not) value to a class supported by
+   * Pinot {@link GenericRow}
+   */
+  @Override
+  protected Object convertSingleValue(Object value) {
+    if (value instanceof BigDecimal) {
+      return Double.valueOf(((BigDecimal) value).doubleValue());

Review comment:
       Note that `BigDecimal` is converted to `Double` as Pinot does not have support for big number columns at the moment and introducing a new type is out of scope in this ticket 




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