Skip to content

Conversation

@sapienza88
Copy link
Contributor

Important Read

  • Please ensure the GitHub issue is mentioned at the beginning of the PR

What is the purpose of the pull request

(For example: This pull request implements the sync for delta format.)

Brief change log

(for example:)

  • Fixed JSON parsing error when persisting state
  • Added unit tests for schema evolution

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:)

  • Added integration tests for end-to-end.
  • Added TestConversionController to verify the change.
  • Manually verified the change by running a job locally.

@sapienza88 sapienza88 changed the title Parquet Incremental Sync: Given a parquet file return data from a certain modification time Parquet Incremental Sync Dec 10, 2025
@rahil-c
Copy link
Contributor

rahil-c commented Dec 15, 2025

I can do first review for this @the-other-tim-brown @vinishjail97

@vinishjail97 vinishjail97 self-requested a review December 16, 2025 08:31
Comment on lines +245 to +259
try (ParquetWriter<Group> writer =
new ParquetWriter<Group>(
outputFile,
new GroupWriteSupport(),
parquetFileConfig.getCodec(),
(int) parquetFileConfig.getRowGroupSize(),
pageSize,
pageSize, // dictionaryPageSize
true, // enableDictionary
false, // enableValidation
ParquetWriter.DEFAULT_WRITER_VERSION,
conf)) {
Group currentGroup = null;
while ((currentGroup = (Group) reader.read()) != null) {
writer.write(currentGroup);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we writing new parquet files again like this through the writer? I think there's some misunderstanding with the parquet incremental sync feature here.

Parquet Incremental Sync Requirements.

  1. You have a target table where parquet files [p1/f1.parquet, p1/f2.parquet, p2/f1.parquet] have been synced to hudi, iceberg and delta for example.
  2. In the source changes some changes have been made a new file in partition p1 was added and p2's file was deleted. The incremental sync should now sync the new changes incrementally.

@sapienza88 It's better to align on the approach first here before we push PR's. Can you add the approach for parquet incremental sync in the PR description or any google doc if possible?

Copy link
Contributor Author

@sapienza88 sapienza88 Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vinishjail97 we simply want to append the file to where it belongs in the table (under the right partition). so we need to find the partition path (from the table's) where the file should be injected (doing this through path construction). In order to write the file the only way as far as I know is the ParquetWriter. After doing so, the Source can filter the files based on the modfication dates.

@sapienza88
Copy link
Contributor Author

@vinishjail97 I added some comments on the functions so that the approach is clearer. All above suggestions were also taken into account in my last commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants