[HUDI-8553] Support writing record positions to log blocks from Spark SQL UPDATE and DELETE statements#12716
Closed
lokeshj1703 wants to merge 5 commits intoapache:masterfrom
Closed
Conversation
nsivabalan
reviewed
Jan 27, 2025
Contributor
nsivabalan
left a comment
There was a problem hiding this comment.
I don't see any changes in the MOR snapshot read relation. I was expecting some change there to return the right value for the row position.
is the patch not yet fully ready ?
I mean, I am not asking about tests, etc, but just from source code standpoint.
| val fileId = FSUtils.getFileId(fileName.get) | ||
| Some(new HoodieRecordLocation(instantTime.get, fileId)) | ||
| val recordPosition: Option[Long] = if (fetchRecordLocationFromMetaFields) { | ||
| // TODO(yihua): fix |
yihua
reviewed
Jan 27, 2025
| attributeRefs = attributeRefs :+ AttributeReference(SparkAdapterSupport.sparkAdapter.getTemporaryRowIndexColumnName(), LongType, nullable = true)() | ||
|
|
||
| val schema = AvroSchemaUtils.projectSchema( | ||
| convertToAvroSchema(catalogTable.tableSchema, catalogTable.tableName), |
Contributor
There was a problem hiding this comment.
Let's see whether we need the full table schema or not, i.e., whether getting targetAttributes or non-updated columns are enough.
Collaborator
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Change Logs
Spark SQL UPDATE and DELETE do not write record positions to the log files. The PR aims to add the metadata in log files so that it can be used for faster merge operations.
Impact
Spark SQL UPDATE and DELETE would write record positions to the log files now and it is useful for merging records.
Risk level (write none, low medium or high below)
low
Documentation Update
NA
Contributor's checklist