Class AvroRecordExtractor

    • Constructor Detail

      • AvroRecordExtractor

        public AvroRecordExtractor()
    • Method Detail

      • extract

        public GenericRow extract​(org.apache.avro.generic.GenericRecord from,
                                  GenericRow to)
      • isRecord

        protected boolean isRecord​(Object value)
        Returns whether the object is an Avro GenericRecord.
        Overrides:
        isRecord in class BaseRecordExtractor<org.apache.avro.generic.GenericRecord>
      • convertRecord

        @Nullable
        protected Object convertRecord​(Object value)
        Handles the conversion of every field of the Avro GenericRecord.
        Overrides:
        convertRecord in class BaseRecordExtractor<org.apache.avro.generic.GenericRecord>
        Parameters:
        value - should be verified to be a GenericRecord type prior to calling this method as it will be casted without checking
      • convertSingleValue

        protected Object convertSingleValue​(Object value)
        This method convert any Avro logical-type converted (or not) value to a class supported by Pinot GenericRow Note that at the moment BigDecimal is converted to Pinot double which may lead to precision loss or may not be represented at all. Similarly, timestamp microsecond precision is not supported at the moment. These values will get converted to millisecond precision.
        Overrides:
        convertSingleValue in class BaseRecordExtractor<org.apache.avro.generic.GenericRecord>