Skip to content

Make sure to fail with HoodieUpsertException if HoodieUpdateHandle is… - #32

Merged
vinothchandar merged 1 commit into
apache:masterfrom
prazanna:master
Jan 6, 2017
Merged

Make sure to fail with HoodieUpsertException if HoodieUpdateHandle is…#32
vinothchandar merged 1 commit into
apache:masterfrom
prazanna:master

Conversation

@prazanna

@prazanna prazanna commented Jan 6, 2017

Copy link
Copy Markdown
Contributor

… not properly initialized

This fixes #31

@vinothchandar
vinothchandar merged commit 93de14f into apache:master Jan 6, 2017
zhangyue19921010 pushed a commit to zhangyue19921010/hudi that referenced this pull request Aug 31, 2023
…he#32)

* [HUDI-6624] Fix to return Empty when there is no commit instant (apache#9325)

* [HUDI-6358] Fix flink payload merger with deletes (apache#8935)
vinishjail97 pushed a commit to vinishjail97/hudi that referenced this pull request Dec 15, 2023
nsivabalan referenced this pull request in nsivabalan/hudi Aug 7, 2026
Reworks the tests voonhous identified as unable to fail on the bugs they were
written for, and adds the coverage that was missing.

Clustering (apache#34). The previous cases only reached assertNotNull on
_hoodie_file_name, which the buggy pre-clustering value also satisfies -- reverting
358fbfd left them green. They now compare the column against
input_file_name() for every row and assert a replacecommit exists, so the test
fails if clustering either does not run or writes a stale file name. Reading through
Hudi rather than globbing parquet also stops the replaced pre-clustering file from
being inspected. The ALL and NONE cases are dropped: both route through
writeRow / writeRowNoMetaFields and never enter the branch the fix touched.

Metadata table (#32). One selective-mode write with MDT enabled, asserting the
write succeeds and the MDT's own table resolves to NONE. Nothing previously proved
the data table's mode cannot leak into HoodieMetadataWriteUtils' fresh config.

Append (apache#33). Every other functional write is SaveMode.Overwrite, i.e. a fresh
table, which skips inheritance entirely -- HoodieSparkSqlWriter folds table props
in only when the mode is not Overwrite, and validateTableConfig is bypassed for
Overwrite. Adds an append that restates nothing and asserts the table stays
COMMIT_TIME_ONLY with commit times on both commits' rows.

Streamer restart (apache#37). cshuo's regression had no test: the file had one
ingestOnce(). Adds a second run that states neither meta-field property and asserts
the mode survives and no row has a null commit time. The parameterized cases are
trimmed to the three selective modes -- ALL and NONE add no mode key, so they
exercised none of the new plumbing -- and no longer pair the mode with the legacy
boolean, which is now a stated conflict.

Strict null assertions (apache#40, apache#41). The two Scala assertions accepted both NULL and
"", so they no longer pinned which representation is written, disagreeing with the
assertNull in the functional test. Replaced by a shared
assertNoMetaFieldsPopulated in HoodieSparkWriterTestBase.

Naming (apache#36 and a collision). Two classes were named TestMetaFieldsMode; the
functional one is now TestMetaFieldsModeE2E. TestHoodieMetaFieldsMode tested
HoodieTableConfig resolution rather than the enum, so it is renamed
TestHoodieTableConfigMetaFieldsMode, with its javadoc naming the two sibling
classes and what each covers. TestHoodieTableConfig gains the storage round-trip
assertion the in-memory cases cannot make.

TestMetaFieldsModeE2E 27/27, TestHoodieTableConfig + resolution 107/107.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
nsivabalan referenced this pull request in nsivabalan/hudi Aug 12, 2026
Reworks the tests voonhous identified as unable to fail on the bugs they were
written for, and adds the coverage that was missing.

Clustering (apache#34). The previous cases only reached assertNotNull on
_hoodie_file_name, which the buggy pre-clustering value also satisfies -- reverting
358fbfd left them green. They now compare the column against
input_file_name() for every row and assert a replacecommit exists, so the test
fails if clustering either does not run or writes a stale file name. Reading through
Hudi rather than globbing parquet also stops the replaced pre-clustering file from
being inspected. The ALL and NONE cases are dropped: both route through
writeRow / writeRowNoMetaFields and never enter the branch the fix touched.

Metadata table (#32). One selective-mode write with MDT enabled, asserting the
write succeeds and the MDT's own table resolves to NONE. Nothing previously proved
the data table's mode cannot leak into HoodieMetadataWriteUtils' fresh config.

Append (apache#33). Every other functional write is SaveMode.Overwrite, i.e. a fresh
table, which skips inheritance entirely -- HoodieSparkSqlWriter folds table props
in only when the mode is not Overwrite, and validateTableConfig is bypassed for
Overwrite. Adds an append that restates nothing and asserts the table stays
COMMIT_TIME_ONLY with commit times on both commits' rows.

Streamer restart (apache#37). cshuo's regression had no test: the file had one
ingestOnce(). Adds a second run that states neither meta-field property and asserts
the mode survives and no row has a null commit time. The parameterized cases are
trimmed to the three selective modes -- ALL and NONE add no mode key, so they
exercised none of the new plumbing -- and no longer pair the mode with the legacy
boolean, which is now a stated conflict.

Strict null assertions (apache#40, apache#41). The two Scala assertions accepted both NULL and
"", so they no longer pinned which representation is written, disagreeing with the
assertNull in the functional test. Replaced by a shared
assertNoMetaFieldsPopulated in HoodieSparkWriterTestBase.

Naming (apache#36 and a collision). Two classes were named TestMetaFieldsMode; the
functional one is now TestMetaFieldsModeE2E. TestHoodieMetaFieldsMode tested
HoodieTableConfig resolution rather than the enum, so it is renamed
TestHoodieTableConfigMetaFieldsMode, with its javadoc naming the two sibling
classes and what each covers. TestHoodieTableConfig gains the storage round-trip
assertion the in-memory cases cannot make.

TestMetaFieldsModeE2E 27/27, TestHoodieTableConfig + resolution 107/107.
nsivabalan referenced this pull request in nsivabalan/hudi Aug 12, 2026
Reworks the tests voonhous identified as unable to fail on the bugs they were
written for, and adds the coverage that was missing.

Clustering (apache#34). The previous cases only reached assertNotNull on
_hoodie_file_name, which the buggy pre-clustering value also satisfies -- reverting
358fbfd left them green. They now compare the column against
input_file_name() for every row and assert a replacecommit exists, so the test
fails if clustering either does not run or writes a stale file name. Reading through
Hudi rather than globbing parquet also stops the replaced pre-clustering file from
being inspected. The ALL and NONE cases are dropped: both route through
writeRow / writeRowNoMetaFields and never enter the branch the fix touched.

Metadata table (#32). One selective-mode write with MDT enabled, asserting the
write succeeds and the MDT's own table resolves to NONE. Nothing previously proved
the data table's mode cannot leak into HoodieMetadataWriteUtils' fresh config.

Append (apache#33). Every other functional write is SaveMode.Overwrite, i.e. a fresh
table, which skips inheritance entirely -- HoodieSparkSqlWriter folds table props
in only when the mode is not Overwrite, and validateTableConfig is bypassed for
Overwrite. Adds an append that restates nothing and asserts the table stays
COMMIT_TIME_ONLY with commit times on both commits' rows.

Streamer restart (apache#37). cshuo's regression had no test: the file had one
ingestOnce(). Adds a second run that states neither meta-field property and asserts
the mode survives and no row has a null commit time. The parameterized cases are
trimmed to the three selective modes -- ALL and NONE add no mode key, so they
exercised none of the new plumbing -- and no longer pair the mode with the legacy
boolean, which is now a stated conflict.

Strict null assertions (apache#40, apache#41). The two Scala assertions accepted both NULL and
"", so they no longer pinned which representation is written, disagreeing with the
assertNull in the functional test. Replaced by a shared
assertNoMetaFieldsPopulated in HoodieSparkWriterTestBase.

Naming (apache#36 and a collision). Two classes were named TestMetaFieldsMode; the
functional one is now TestMetaFieldsModeE2E. TestHoodieMetaFieldsMode tested
HoodieTableConfig resolution rather than the enum, so it is renamed
TestHoodieTableConfigMetaFieldsMode, with its javadoc naming the two sibling
classes and what each covers. TestHoodieTableConfig gains the storage round-trip
assertion the in-memory cases cannot make.

TestMetaFieldsModeE2E 27/27, TestHoodieTableConfig + resolution 107/107.
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.

Hoodie Upset fails with InvalidParquetMetadata because of a parquet file partially written

3 participants