-
Notifications
You must be signed in to change notification settings - Fork 190
Delta Kernel Draft PR #729
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: main
Are you sure you want to change the base?
Conversation
| <module>xtable-aws</module> | ||
| <module>xtable-hive-metastore</module> | ||
| <module>xtable-service</module> | ||
| <!-- <module>xtable-service</module>--> |
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.
This should be added back, any reason why you had to comment this out?
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.
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.
@vaibhavk1992 I think if you rebase with latest main branch you shouldn't see those failures.
xtable-core/pom.xml
Outdated
| <dependency> | ||
| <groupId>io.delta</groupId> | ||
| <artifactId>delta-kernel-api</artifactId> | ||
| <version>4.0.0</version> |
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.
Can you add a properly in the root pom called <delta.kernel.version>4.0.0</delta.kernel.version>, instead of using the hardcoded value?
Also curious how you ended up choosing delta kernel version, is there some specific version that needs to align with delta lake version we have in the repo?
| public class DeltaKernelConversionSourceProvider extends ConversionSourceProvider<Long> { | ||
| @Override | ||
| public DeltaKernelConversionSource getConversionSourceInstance(SourceTable sourceTable) { | ||
| Configuration hadoopConf = new Configuration(); |
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.
Is there any reason why you are creating a new hadoopConf, can you instead use the hadoopConf from the parent class similar to what DeltaConversionSourceProvider does.
xtable-core/src/main/java/org/apache/xtable/delta/DeltaKernelSchemaExtractor.java
Outdated
Show resolved
Hide resolved
xtable-core/src/main/java/org/apache/xtable/delta/DeltaKernelTableExtractor.java
Outdated
Show resolved
Hide resolved
| * Converts between Delta and InternalTable schemas. Some items to be aware of: | ||
| * | ||
| * <ul> | ||
| * <li>Delta schemas are represented as Spark StructTypes which do not have enums so the enum |
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 we can live this file as is right?
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.
@vaibhavk1992 let's remove the changes to this file. They don't seem necessary
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.
@vaibhavk1992 please follow up on this
xtable-core/src/main/java/org/apache/xtable/kernel/DeltaKernelConversionSource.java
Show resolved
Hide resolved
xtable-core/src/main/java/org/apache/xtable/delta/DeltaKernelDataFileExtractor.java
Outdated
Show resolved
Hide resolved
xtable-core/src/main/java/org/apache/xtable/delta/DeltaKernelDataFileExtractor.java
Show resolved
Hide resolved
| <module>xtable-aws</module> | ||
| <module>xtable-hive-metastore</module> | ||
| <module>xtable-service</module> | ||
| <!-- <module>xtable-service</module>--> |
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 comment this?
vinishjail97
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.
This is great progress @vaibhavk1992, added some comments.
| <module>xtable-aws</module> | ||
| <module>xtable-hive-metastore</module> | ||
| <module>xtable-service</module> | ||
| <!-- <module>xtable-service</module>--> |
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.
@vaibhavk1992 I think if you rebase with latest main branch you shouldn't see those failures.
xtable-core/src/main/java/org/apache/xtable/delta/DeltaKernelActionsConverter.java
Outdated
Show resolved
Hide resolved
xtable-core/src/main/java/org/apache/xtable/kernel/DeltaKernelIncrementalChangesState.java
Show resolved
Hide resolved
xtable-core/src/main/java/org/apache/xtable/kernel/DeltaKernelConversionSource.java
Outdated
Show resolved
Hide resolved
|
@vaibhavk1992 can you write up a summary of next steps and blockers for this feature? |
|
Below is the summary of the difference between two schemes (Delta vs Kernel) also added the what remains the difference between two. Comparison of Schema Responses: Delta Kernel vs Delta LogThis document outlines the differences in schema responses when using Delta Kernel and Delta Log APIs to retrieve changes in a Delta table. The comparison highlights the structure and format of the responses, providing insights into how the two approaches differ. Delta Kernel Schema ResponseWhen using the Sample Output1 row is an object ==> io.delta.kernel.internal.data.ColumnarBatchRow@20c03e47 Key Characteristics
Use CaseThis format is suitable for low-level data processing where the focus is on performance and accessing raw data. Delta Log Schema ResponseWhen using the
This issue is currently in blocked state. I raised it with delta team quite a few time but no response over it. |
|
@vaibhavk1992 I pushed some changes in the latest commit to extract the add and remove files per version. |
xtable-core/src/main/java/org/apache/xtable/kernel/DeltaKernelSchemaExtractor.java
Show resolved
Hide resolved
xtable-core/src/main/java/org/apache/xtable/kernel/DeltaKernelPartitionExtractor.java
Show resolved
Hide resolved
xtable-core/src/main/java/org/apache/xtable/kernel/DeltaKernelStatsExtractor.java
Show resolved
Hide resolved
xtable-core/src/main/java/org/apache/xtable/kernel/DeltaKernelActionsConverter.java
Outdated
Show resolved
Hide resolved
| * Converts between Delta and InternalTable schemas. Some items to be aware of: | ||
| * | ||
| * <ul> | ||
| * <li>Delta schemas are represented as Spark StructTypes which do not have enums so the enum |
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.
@vaibhavk1992 let's remove the changes to this file. They don't seem necessary
| this.fields = schema.getFields(); | ||
|
|
||
| StructType fullSchema = snapshot.getSchema(); // The full table schema | ||
| List<String> partitionColumns = snapshot.getPartitionColumnNames(); // List<String> |
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.
Remove the comment // List<String>?

Important Read
What is the purpose of the pull request
(For example: This pull request implements the sync for delta format.)
Brief change log
(for example:)
Verify this pull request
(Please pick either of the following options)
This pull request is a trivial rework / code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)