APISonar


com.linkedin.pinot.common.data.FieldSpec.FieldType.TIME

> com > linkedin > pinot > common > data > FieldSpec > FieldType > TIME
com APIs linkedin APIs pinot APIs common APIs data APIs FieldSpec APIs FieldType APIs TIME APIs

Example 1
public GenericRow transform(@Nonnull GenericData.Record from, @Nonnull GenericRow to) {
    for (FieldSpec fieldSpec : _schema.getAllFieldSpecs()) {
      FieldSpec incomingFieldSpec =
          fieldSpec.getFieldType() == FieldSpec.FieldType.TIME ? _incomingTimeFieldSpec : fieldSpec;
      String fieldName = incomingFieldSpec.getName();
      Object avroValue = from.get(fieldName);
      if (incomingFieldSpec.isSingleValueField()) {
        to.putField(fieldName, AvroUtils.transformAvroValueToObject(avroValue, incomingFieldSpec));
      } else {
        to.putField(fieldName, AvroUtils.transformAvroArrayToObjectArray((Array) avroValue, incomingFieldSpec));
      }
    }

    return to;
  }