Record Class PqInterval
java.lang.Object
java.lang.Record
dev.hardwood.row.PqInterval
- Record Components:
months- number of months (unsigned 32-bit, range 0–4,294,967,295)days- number of days (unsigned 32-bit, range 0–4,294,967,295)milliseconds- number of milliseconds (unsigned 32-bit, range 0–4,294,967,295)
Value type for the Parquet INTERVAL logical type.
The three components are stored independently — they are not normalized
(e.g. 90 days is not converted to ~3 months) because the calendar semantics
of months and days vary. The on-disk encoding is a 12-byte
FIXED_LEN_BYTE_ARRAY: three little-endian unsigned 32-bit integers in
the order months, days, milliseconds.
Each component is exposed as a long holding its unsigned 32-bit value,
so all values are in the range [0, 4_294_967_295].
-
Constructor Summary
ConstructorsConstructorDescriptionPqInterval(long months, long days, long milliseconds) Creates an instance of aPqIntervalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongdays()Returns the value of thedaysrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of themillisecondsrecord component.longmonths()Returns the value of themonthsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PqInterval
public PqInterval(long months, long days, long milliseconds) Creates an instance of aPqIntervalrecord class.- Parameters:
months- the value for themonthsrecord componentdays- the value for thedaysrecord componentmilliseconds- the value for themillisecondsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
months
-
days
-
milliseconds
public long milliseconds()Returns the value of themillisecondsrecord component.- Returns:
- the value of the
millisecondsrecord component
-