Interface PqMap.Entry

Enclosing interface:
PqMap

public static interface PqMap.Entry

A single key-value entry in a map.

The key-side accessor surface is intentionally narrower than the value side: real-world Parquet map keys cluster on String, Int, Long, and occasionally Binary (Avro maps are string-keyed by spec, and ID-keyed maps account for nearly all numeric-keyed cases). Other logical types are well-defined as keys but vanishingly rare in practice — they fall back to getKey() (decoded) and getRawKey() (raw) rather than each having a dedicated typed accessor.

  • Method Details

    • getIntKey

      int getIntKey()
      Get the key as an INT32.
      Returns:
      the int key value
    • getLongKey

      long getLongKey()
      Get the key as an INT64.
      Returns:
      the long key value
    • getStringKey

      String getStringKey()
      Get the key as a STRING.
      Returns:
      the string key value
    • getBinaryKey

      byte[] getBinaryKey()
      Get the key as a BINARY.
      Returns:
      the byte array key value
    • getKey

      Object getKey()

      Get the key, decoded to its logical-type representation.

      Returns the same form as the typed key accessors above (Integer, Long, String, byte[]) and additionally covers the long-tail logical types not exposed individually — LocalDate for DATE, LocalTime for TIME, Instant for TIMESTAMP, BigDecimal for DECIMAL, UUID for UUID — with byte[] for un-annotated BYTE_ARRAY / FIXED_LEN_BYTE_ARRAY columns.

      Use getRawKey() to obtain the underlying physical value instead.

      Returns:
      the decoded key value
    • getRawKey

      Object getRawKey()
      Get the key as its raw physical representation, without logical-type decoding (e.g. an INT64-backed TIMESTAMP returns Long, not Instant; a FIXED_LEN_BYTE_ARRAY-backed DECIMAL returns byte[], not BigDecimal).
      Returns:
      the raw key value
    • getIntValue

      int getIntValue()
      Get the value as an INT32.
      Returns:
      the int value
      Throws:
      NullPointerException - if the value is null
    • getLongValue

      long getLongValue()
      Get the value as an INT64.
      Returns:
      the long value
      Throws:
      NullPointerException - if the value is null
    • getFloatValue

      float getFloatValue()
      Get the value as a FLOAT.
      Returns:
      the float value
      Throws:
      NullPointerException - if the value is null
    • getDoubleValue

      double getDoubleValue()
      Get the value as a DOUBLE.
      Returns:
      the double value
      Throws:
      NullPointerException - if the value is null
    • getBooleanValue

      boolean getBooleanValue()
      Get the value as a BOOLEAN.
      Returns:
      the boolean value
      Throws:
      NullPointerException - if the value is null
    • getStringValue

      String getStringValue()
      Get the value as a STRING.
      Returns:
      the string value, or null if the value is null
    • getBinaryValue

      byte[] getBinaryValue()
      Get the value as a BINARY.
      Returns:
      the byte array value, or null if the value is null
    • getDateValue

      LocalDate getDateValue()
      Get the value as a DATE.
      Returns:
      the date value, or null if the value is null
    • getTimeValue

      LocalTime getTimeValue()
      Get the value as a TIME.
      Returns:
      the time value, or null if the value is null
    • getTimestampValue

      Instant getTimestampValue()
      Get the value as a TIMESTAMP.
      Returns:
      the instant value, or null if the value is null
    • getDecimalValue

      BigDecimal getDecimalValue()
      Get the value as a DECIMAL.
      Returns:
      the decimal value, or null if the value is null
    • getUuidValue

      UUID getUuidValue()
      Get the value as a UUID.
      Returns:
      the UUID value, or null if the value is null
    • getIntervalValue

      PqInterval getIntervalValue()
      Get the value as an INTERVAL.
      Returns:
      the interval value, or null if the value is null
    • getStructValue

      PqStruct getStructValue()
      Get the value as a nested struct.
      Returns:
      the nested struct, or null if the value is null
    • getListValue

      PqList getListValue()
      Get the value as a LIST.
      Returns:
      the list value, or null if the value is null
    • getMapValue

      PqMap getMapValue()
      Get the value as a MAP.
      Returns:
      the nested map, or null if the value is null
    • getVariantValue

      PqVariant getVariantValue()

      Get the value as a VARIANT.

      Only unshredded variants are supported in repeated contexts today; shredded variant values throw UnsupportedOperationException.

      Returns:
      the variant, or null if the value is null
      Throws:
      UnsupportedOperationException - if the variant is shredded
    • getValue

      Object getValue()

      Get the value, decoded to its logical-type representation.

      Returns the same form as the typed value accessors above (boxed primitive, String, LocalDate, LocalTime, Instant, BigDecimal, UUID, PqInterval, PqStruct, PqList, PqMap), with byte[] for un-annotated BYTE_ARRAY / FIXED_LEN_BYTE_ARRAY columns.

      Use getRawValue() to obtain the underlying physical value instead.

      Returns:
      the decoded value, or null if the value is null
    • getRawValue

      Object getRawValue()
      Get the value as its raw physical representation, without logical-type decoding. Primitive values surface as the underlying Integer / Long / Float / Double / Boolean / byte[]. Nested values (struct / list / map) have no useful "raw" form and are still returned as their typed flyweight (PqStruct / PqList / PqMap).
      Returns:
      the raw value, or null if the value is null
    • isValueNull

      boolean isValueNull()
      Check if the value is null.
      Returns:
      true if the value is null