Class TimestampWrapper


  • public class TimestampWrapper
    extends Object
    This class represents the outcome of timestamp parsing and validation. It contains methods needed to serialize timestamps into Parquet.
    • Constructor Detail

      • TimestampWrapper

        public TimestampWrapper​(OffsetDateTime offsetDateTime,
                                int scale)
        Create a new instance from OffsetDateTime and its scale.
    • Method Detail

      • toBinary

        public BigInteger toBinary​(boolean includeTimezone)
        Convert the timestamp to a binary representation. Needs to be aligned with SFTimestamp.toBinary(int, boolean).
      • getEpoch

        public long getEpoch()
        Get epoch in seconds
      • getFraction

        public int getFraction()
        Get fractional part of a second
      • getTimezoneOffsetSeconds

        public int getTimezoneOffsetSeconds()
        Get timezone offset in seconds
      • getTimeZoneIndex

        public int getTimeZoneIndex()
        Get timezone index, 1440 means UTC. Calculation needs to be aligned with SFTimestamp.toBinary(int, boolean)