-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29448][SQL] Support the INTERVAL type by Parquet datasource
#26102
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1c64fb1
Support the interval type in schemas
MaxGekk 0769585
Support the interval type in ColumnarBatchRow
MaxGekk cfcecf1
Fix imports
MaxGekk c7889ed
Support writing and reading intervals
MaxGekk 4563a4e
Remove unused variable
MaxGekk 83b4bf2
Fix coding style
MaxGekk 81ef7be
Exclude parquet from checking
MaxGekk de0872e
Exclude parquet from checks of unsupported interval
MaxGekk 281f62b
Combine AtomicType and CalendarIntervalType in supportDataType()
MaxGekk 232b1fb
Replace timestampBuffer and intervalBuffer by reusableBuffer
MaxGekk 3f6ad61
Move unsupported type check to checkUnsupportedTypes()
MaxGekk c260622
Add more tests to ParquetQuerySuite
MaxGekk 8fd037b
Merge remote-tracking branch 'origin/master' into parquet-interval
MaxGekk 032a2ea
CalendarInterval.fromString -> IntervalUtils.fromString
MaxGekk 6834f1e
Merge remote-tracking branch 'remotes/origin/master' into parquet-int…
MaxGekk 712378c
Rebase on new field - days
MaxGekk cf8023a
Add one more test
MaxGekk 8fa4a0d
Merge remote-tracking branch 'remotes/origin/master' into parquet-int…
MaxGekk 9041110
Rebase on the master
MaxGekk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Rebase on new field - days
- Loading branch information
commit 712378c6001c352d76c28c6cdf6176b694ea5355
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
@MaxGekk the doc(https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#interval) says:
what happens if we set negative values for some parts in the interval and negative values are written here?
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.
Spark will read them back as negative values: https://github.com/apache/spark/pull/26102/files#diff-35a70bb270f17ea3a1d964c4bec0e0a2R912 . I don't know about other systems.
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.
Hm, shouldn't we maybe add an assert to reject negative parts for now? Seems it doesn't comply parquet format. I'm just worried about the case we have to explain this multiple times to users later like https://issues.apache.org/jira/browse/SPARK-20937 and https://issues.apache.org/jira/browse/SPARK-20297
Do you think it is common to use negative parts? If not, let's just disallow.
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.
we should use strict toInt so that we can fail earlier if out of range.
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.
fixed