Code Monkey home page Code Monkey logo

Comments (2)

flipp5b avatar flipp5b commented on June 20, 2024

How naive of me: as always, time-related machinery is like a rabbit hole 😅

Ambiguity

Given

  • Date Time: 2019-01-01T00:00
  • Time Zone: Africa/Nairobi

Current LocalDateTime-based encoder "output"

  • Julian day: 2458485
  • Nanos: -10800000000000

Suggested Instant-based encoder "output"

  • Julian day: 2458484
  • Nanos: 75600000000000

Both these outputs denote the same point in time. Instant-based decoder correctly restores value produced by LocalDateTime-based encoder and vice versa. But this is still an observable behavior change. I suppose this is undesirable (or not?). Anyway, I have no idea which of the outputs is correct/preferable because of the next issue.

INT96 format itself

The INT96 format is deprecated (see here) and even lacks any documentation (see discussion here).

With all that said, wouldn't it be better to soft-deprecate default timestamp codecs in parquet4s and encourage users to choose INT64-based ones? Also, we could switch to an Instant internally and use the LocalDateTime-based implementation only as a fallback for the INT96 format.

from parquet4s.

mjakubowski84 avatar mjakubowski84 commented on June 20, 2024

I suppose this is undesirable (or not?)

I guess there must be a small bug that's causing it. Definitely, it is undesirable because produces different data.

The INT96 format is deprecated (see here) and even lacks any documentation (see discussion apache/parquet-format#49).

Yes, it is deprecated, but yet (!) it is still a default format in such priminent tools as Spark, Impala and many others.

from parquet4s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.