-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
The last of the getTimeFieldSpec calls #5378
Conversation
d9f15ed
to
540db6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this PR, but inside the Schema can we do the TimeFieldSpec to DateTimeFieldSpec conversion on the setter side instead of the getter side?
The problem of conversion on the getter side is that the schema still stores the deprecated TimeFieldSpec, and getFieldSpecMap()
and getFieldSpecFor()
will still return the TimeFieldSpec instead of DateTimeFieldSpec. This can easily cause bugs inside the code.
pinot-core/src/main/java/org/apache/pinot/core/realtime/converter/RealtimeSegmentConverter.java
Show resolved
Hide resolved
...-core/src/main/java/org/apache/pinot/core/indexsegment/generator/SegmentGeneratorConfig.java
Outdated
Show resolved
Hide resolved
...e/src/test/java/org/apache/pinot/core/indexsegment/generator/SegmentGeneratorConfigTest.java
Outdated
Show resolved
Hide resolved
...e/src/test/java/org/apache/pinot/core/indexsegment/generator/SegmentGeneratorConfigTest.java
Outdated
Show resolved
Hide resolved
|
||
@Test | ||
public void testNoTimeColumnsInSchema() { | ||
Schema schema = new Schema(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still want this support? (Realtime table without time column)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
realtime table without time will never happen right?
Also after changing the getUpdatedSchema method, this test becomes irrelevant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @fx19880617 added that support. Any opinion on this?
That was exactly the initial plan - to modify the setter to save it as a DateTimeFieldspec. But now we changed the plan. We are not going to do any changes to ser/deser. Reason mainly being external integrations (presto, superset etc) which still need TimeFieldSpec, and also upgrades. I've updated the design doc: https://docs.google.com/document/d/1SU1jCjfsIDSA960fD5YWQbD72p8UdGF0c7CroFNt9Ho/edit#heading=h.6gaudq1t6ys8 (Step C and also put the previous approach in Discarded section) New plan is to make sure Pinot can treat TIME or DATE_TIME either of them as the primary time column. |
#2756
Removing the last of the getTimeFieldSpec calls.