-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make DateTimeFieldSpecs mainstream, deprecate TimeFieldSpec #2756
Comments
I want to discuss about enforcing a uniform type & format and only allow users to pick the granularity for the
I think that having a uniform type & format for the primary column can simplify a lot of components because we won't need to support all different type formats when we need to play with the time. For example, segment roll-up config can be very simple - instead of having type, format, granularity, only granularity will be needed. Another huge benefit will be an easier integration with external UIs such as Superset. I believe that Pinot-Superset connector have some extra logic to convert the time column values into a format that Superset understands. Since pinot's time column format/type will be different for each table, the external system now needs to know about Pinot's table configuration & schema (or similar time conversion config need to be specified for each table on Superset) for correctly parsing the time column value. Since we make the interface change to the time column, it would be great if we can discuss about this. @kishoreg @npawar @mayankshriv @Jackie-Jiang How do you guys think? |
I agree this would be nice to have, and see the benefits we gain for merge/rollup and integrations. |
This is an item of project: #2756 We plan to internally start treating timeFieldSpec as dateTimeFieldSpec. This PR adds a utility function which converts a timeFieldSpec to an equivalent dateTimeFieldSpec. Note that dateTimeFieldSpec doesn't have the concept of incoming/outgoing, and hence we construct and add a transform function to convey the conversion. Introduced a lot of epoch time transform functions for this. NOTE: the toEpochXXXBucket method is added to help with conversion from timeFieldSpec to dateTimeFieldSpec. Practically, we would only be using toEpochXXX and toEpochXXXRounded.
Another step towards Issue #2756. As I was making changes to Schema to treat TIME as DATE_TIME, found a subset of changes that can go prior to the bigger change. Removing 3 methods from the Schema which are related to TimeFieldSpec 1. getIncomingTimeUnit - was unused 2. getOutgoingTimeUnit - was unused 3. getTimeColumnName - was able to remove the 4 usages
In the Pinot Schema, stop using TimeFieldSpec, in favor of DateTimeFieldSpec.
The TimeFieldSpec is not adequate for the following reasons
The text was updated successfully, but these errors were encountered: