-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[core] Support chain tbl on batch mode #6394
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
base: master
Are you sure you want to change the base?
[core] Support chain tbl on batch mode #6394
Conversation
7efbc2f to
817cf2a
Compare
| /** Utils for table. */ | ||
| public class ChainTableUtils { | ||
|
|
||
| public static void checkChainTableOptions( |
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.
Add this in SchemaValidation?
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.
SchemaValidation
Done
817cf2a to
84ee5b3
Compare
paimon-core/src/main/java/org/apache/paimon/schema/SchemaValidation.java
Outdated
Show resolved
Hide resolved
paimon-core/src/main/java/org/apache/paimon/schema/SchemaValidation.java
Outdated
Show resolved
Hide resolved
paimon-core/src/main/java/org/apache/paimon/io/KeyValueFileReaderFactory.java
Show resolved
Hide resolved
paimon-core/src/main/java/org/apache/paimon/mergetree/compact/MergeTreeCompactManager.java
Outdated
Show resolved
Hide resolved
|
Looks good to me +1. Please take another look cc @JingsongLi |
e9c9096 to
90ac914
Compare
b9000a9 to
49c13e0
Compare
JingsongLi
left a comment
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.
Please add documentation.
| return result.substring(0, Math.min(result.length(), maxLength)); | ||
| } | ||
|
|
||
| public List<String> generateOrderPartValues(InternalRow in) { |
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.
Why add this? What is difference? You can add a test for this.
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.
It is hoped to obtain the partition values in the order of the partition fields, and then calculate the dependent partitions according to the unit step size. For example, taking the hourly level as an example, the unit step size of the partition is hours. If starting from 0:00 on 20250811 and ending at 0:00 on 20250812, 24 incremental partitions in hours can be obtained, for the specific usage, please refer to org.apache.paimon.partition.InternalRowPartitionUtils#getDeltaPartitions. Unit tests have been added, please refer to org.apache.paimon.utils.InternalRowPartitionComputerTest#testGenerateOrderPartValues
| return newPathFromName(newFileName(prefix)); | ||
| } | ||
|
|
||
| public Path newPath(String prefix, Path relativeBucketPath) { |
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.
Why add this?
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.
For chain table, one logical partition may correspond to multiple physical partitions. Therefore, when creating a new path, on the basis of the original api about newPath, both partitions and buckets need to be specified simultaneously. The current interface is not in use for now. It is only for compatibility with the function of creating new path
bc0d580 to
ae17ace
Compare
done |
ae17ace to
225f73b
Compare
Co-authored-by: zhoufa <[email protected]>
225f73b to
7211870
Compare
Purpose
Related to PIP: https://cwiki.apache.org/confluence/display/PAIMON/PIP-37%3A+Introduce+Chain+Table
Linked issue
#6313
Tests
see: org.apache.paimon.spark.SparkCatalogWithHiveTest#testChainTable
API and Format
Related to PIP: https://cwiki.apache.org/confluence/display/PAIMON/PIP-37%3A+Introduce+Chain+Table
Documentation
Related to PIP: https://cwiki.apache.org/confluence/display/PAIMON/PIP-37%3A+Introduce+Chain+Table