Skip to content
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

SNOW-1772187 nultiple columns evolution bug #980

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sfc-gh-bzabek
Copy link
Contributor

@sfc-gh-bzabek sfc-gh-bzabek commented Oct 29, 2024

Overview

SNOW-1772187
Open the Jira ticket to see a detailed description.

Below test shows the bug.

Pre-review checklist

  • This change should be part of a Behavior Change Release. See go/behavior-change.
  • This change has passed Merge gate tests
  • Snowpipe Changes
  • Snowpipe Streaming Changes
  • This change is TEST-ONLY
  • This change is README/Javadocs only
  • This change is protected by a config parameter <PARAMETER_NAME> eg snowflake.ingestion.method.
    • Yes - Added end to end and Unit Tests.
    • No - Suggest why it is not param protected
  • Is his change protected by parameter <PARAMETER_NAME> on the server side?
    • The parameter/feature is not yet active in production (partial rollout or PrPr, see Changes for Unreleased Features and Fixes).
    • If there is an issue, it can be safely mitigated by turning the parameter off. This is also verified by a test (See go/ppp).

@sfc-gh-bzabek sfc-gh-bzabek requested a review from a team as a code owner October 29, 2024 13:44
@sfc-gh-bzabek sfc-gh-bzabek force-pushed the bzabek-SNOW-1772187-multiple-fields-evolution-bug branch from 781f7f4 to 740d52b Compare October 29, 2024 13:46
waitForOffset(1);

// and another record with same schema
service.insert(Collections.singletonList(createKafkaRecord(message, 1, withSchema)));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This insertion works fine. It adds 9 new columns.

rows = describeTable(tableName);
assertThat(rows).hasSize(15);
service.insert(Collections.singletonList(createKafkaRecord(mapRecordJson, 2, false)));
waitForOffset(3); // FAIL
Copy link
Contributor Author

@sfc-gh-bzabek sfc-gh-bzabek Oct 29, 2024

Choose a reason for hiding this comment

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

However here it fails to ingest data. With error described in Jira

// reinsert record with extra field
service.insert(Collections.singletonList(createKafkaRecord(mapRecordJson, 2, false)));
rows = describeTable(tableName);
assertThat(rows).hasSize(15);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Number of columns is correct. Schema evolution logic altered the table.

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.

1 participant