Interface PqMap.Entry
- Enclosing interface:
PqMap
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 Summary
Modifier and TypeMethodDescriptionbyte[]Get the key as a BINARY.byte[]Get the value as a BINARY.booleanGet the value as a BOOLEAN.Get the value as a DATE.Get the value as a DECIMAL.doubleGet the value as a DOUBLE.floatGet the value as a FLOAT.Get the value as an INTERVAL.intGet the key as an INT32.intGet the value as an INT32.getKey()Get the key, decoded to its logical-type representation.Get the value as a LIST.longGet the key as an INT64.longGet the value as an INT64.Get the value as a MAP.Get the key as its raw physical representation, without logical-type decoding (e.g. an INT64-backed TIMESTAMP returnsLong, notInstant; a FIXED_LEN_BYTE_ARRAY-backed DECIMAL returnsbyte[], notBigDecimal).Get the value as its raw physical representation, without logical-type decoding.Get the key as a STRING.Get the value as a STRING.Get the value as a nested struct.Get the value as a TIMESTAMP.Get the value as a TIME.Get the value as a UUID.getValue()Get the value, decoded to its logical-type representation.Get the value as a VARIANT.booleanCheck if the value is null.
-
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
-
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 —LocalDatefor DATE,LocalTimefor TIME,Instantfor TIMESTAMP,BigDecimalfor DECIMAL,UUIDfor UUID — withbyte[]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 returnsLong, notInstant; a FIXED_LEN_BYTE_ARRAY-backed DECIMAL returnsbyte[], notBigDecimal).- 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
-
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
-
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), withbyte[]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 underlyingInteger/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
-