Repository navigation
Conversation
The hive scenario fails intermittently because GcsTransport names event files by eventTime in milliseconds and refuses to overwrite. The CTAS COMPLETE and its nested insert COMPLETE often share a millisecond, so one of them is dropped. The test is correct; the transport loses the event. hive_insert covers the same t1 -> t2 lineage with CREATE TABLE + INSERT INTO ... SELECT, which has no nested execution. Without CTAS, Spark 3.3.2 and 3.5.1 emit the same insert job, so one set of expected events covers all Spark versions. hive now runs from OpenLineage 1.55.0, by which time the transport should be fixed upstream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: tnazarew <tomasz.nazarewicz@getindata.com>
tnazarew
force-pushed
the
spark/hive-insert-scenario
branch
from
October 16, 2026 14:12
80c86ce to
e3e9ab5
Compare
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.
Problem
The
spark_dataproc/hivescenario fails intermittently: every test tied to theexecute_insert_into_hive_table.warehouse_t2(Spark 3.5.1) orexecute_create_hive_table_as_select_command.default_t2(Spark ≤3.3.2) COMPLETE event reports "not found". These failures account for many of the automated failure issues.The test is correct. The event is lost by the OpenLineage
GcsTransport:<eventTime epochMillis>.jsonand throwsalready existsif that name is taken (GcsTransport.java,emitEvent/uploadObject).CREATE TABLE ... AS SELECTruns a nested insert, and its COMPLETE event often has the same millisecondeventTimeas the CTAS COMPLETE. One of the two is dropped, and the exception is only logged.<epochMillis>-<UUID>.json.Evidence from CI (Dataproc job
6e106620-f4d0-47f5-bbee-4b64531f2fa5, 2026-10-13):Change
hive_insert. It covers the samet1 -> t2lineage (schema, column lineage, dataSource, symlinks and the GCP facets), but usesCREATE TABLE t2 ...followed byINSERT INTO t2 SELECT * FROM t1instead of CTAS. There is no nested execution, so no two events share a timestamp. Without CTAS, Spark 3.3.2 and 3.5.1 emit the same insert job, so one set of expected events covers all Spark versions.hivegated to OpenLineage ≥ 1.55.0 (scenario-levelopenlineage_versions.min). It comes back once the transport is fixed upstream. If the fix misses 1.55.0, the gate should be raised.Verification (local Spark with the OpenLineage listener)
hive(CTAS)hive_insertalready existserrors/user/hive/warehouse)scripts/check_configs.shpasses.get_valid_test_scenarios.shselects onlyhive_insertfor 1.32 and 1.54, and both scenarios from 1.55.0.Not verified locally: Dataproc-only facet values (
gcp_dataproc.projectId,gcp_lineage) and Spark 3.1.3. The CI run on this PR should cover them.🤖 Generated with Claude Code