Null handling for time column#7269
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7269 +/- ##
============================================
- Coverage 71.32% 71.30% -0.02%
+ Complexity 3367 3280 -87
============================================
Files 1503 1503
Lines 74030 74050 +20
Branches 10718 10723 +5
============================================
Hits 52803 52803
- Misses 17622 17637 +15
- Partials 3605 3610 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
The time field can be of type TIME or DATE_TIME, so we might want to check the field name instead
There was a problem hiding this comment.
Looks like the existing logic will only leave out TIME type as null. DATE_TIME will be filled with default value by
org.apache.pinot.spi.data.FieldSpec.getDefaultNullValue.
There was a problem hiding this comment.
The current code has not been updated accordingly when we deprecate the TIME field spec. The main time column can be defined as a DATE_TIME field (also this is recommended), so we should skip the main time column, instead of the TIME field.
There was a problem hiding this comment.
Got it. Will update this part.
...cal/src/main/java/org/apache/pinot/segment/local/recordtransformer/NullValueTransformer.java
Outdated
Show resolved
Hide resolved
...cal/src/main/java/org/apache/pinot/segment/local/recordtransformer/NullValueTransformer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
There can be multiple date time fields. Do we want to handle the null time value for only the time column or all the date time fields?
There was a problem hiding this comment.
Only the time column.
...pi/src/main/java/org/apache/pinot/spi/config/table/SegmentsValidationAndRetentionConfig.java
Outdated
Show resolved
Hide resolved
...cal/src/main/java/org/apache/pinot/segment/local/recordtransformer/NullValueTransformer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
add the release notes about this new config?
13a16ce to
44a8179
Compare
...cal/src/main/java/org/apache/pinot/segment/local/recordtransformer/NullValueTransformer.java
Outdated
Show resolved
Hide resolved
|
can we make sure we update the docs.we should have a page for time column |
Will do. |
b2889a6 to
22a9a98
Compare
Related with [#7269](apache/pinot#7269), add new config allowNullTimeValue about null time value handling.
Description
Add optional time column null value handling. Per the discussion in #7202.
Release Note
This PR introduces a new table config field: allowNullTimeValue.
Default value for this field is set to be false to keep backward compatibility.
If "allowNullTimeValue" is set to be true and time column value is null from data source, a default time value based on machine time will be filled in.