Class DynamoDBFieldResolver

    • Field Summary

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Object getFieldValue​(org.apache.arrow.vector.types.pojo.Field field, Object originalValue)
      Return the field value from a complex structure or list.
      Object getMapKey​(org.apache.arrow.vector.types.pojo.Field field, Object originalValue)
      Allow for additional logic to be apply for the retrieval of map keys If not overwritten, the default behavior is to assume a standard map with no special logic where the key is NOT a complex value
      Object getMapValue​(org.apache.arrow.vector.types.pojo.Field field, Object originalValue)
      Allow for additional logic to be apply for the retrieval of map values If not overwritten, the default behavior is to assume a standard map with no special logic and return the value directly
    • Constructor Detail

      • DynamoDBFieldResolver

        public DynamoDBFieldResolver​(DDBRecordMetadata recordMetadata)
    • Method Detail

      • getFieldValue

        public Object getFieldValue​(org.apache.arrow.vector.types.pojo.Field field,
                                    Object originalValue)
                             throws RuntimeException
        Return the field value from a complex structure or list.
        Specified by:
        getFieldValue in interface FieldResolver
        Parameters:
        field - is the field that we would like to extract from the provided value.
        originalValue - is the original value object.
        Returns:
        the field's value as a List for a LIST field type, a Map for a STRUCT field type, or the actual value if neither of the above.
        Throws:
        IllegalArgumentException - if originalValue is not an instance of Map.
        RuntimeException - if the fieldName does not exist in originalValue, or if the fieldType is a STRUCT and the fieldValue is not instance of Map.
      • getMapKey

        public Object getMapKey​(org.apache.arrow.vector.types.pojo.Field field,
                                Object originalValue)
        Description copied from interface: FieldResolver
        Allow for additional logic to be apply for the retrieval of map keys If not overwritten, the default behavior is to assume a standard map with no special logic where the key is NOT a complex value
        Specified by:
        getMapKey in interface FieldResolver
        Parameters:
        field - The field that we would like to extract from the provided value.
        originalValue - The complex value we'd like to extract the provided field from.
        Returns:
        The value to use for the given field.
      • getMapValue

        public Object getMapValue​(org.apache.arrow.vector.types.pojo.Field field,
                                  Object originalValue)
        Description copied from interface: FieldResolver
        Allow for additional logic to be apply for the retrieval of map values If not overwritten, the default behavior is to assume a standard map with no special logic and return the value directly
        Specified by:
        getMapValue in interface FieldResolver
        Parameters:
        field - The field that we would like to extract from the provided value.
        originalValue - The complex value we'd like to extract the provided field from.
        Returns:
        The value to use for the given field.