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

chore: fix bad error message on insert into #6793

Merged
merged 1 commit into from
Dec 17, 2020

Conversation

agavra
Copy link
Contributor

@agavra agavra commented Dec 16, 2020

Description

fixes #6760 by ensuring that the old error message is thrown when we try to insert into a source with more columns than it has. before this patch, the code would fail with IndexOutOfBounds exception when trying to get the column at an index greater than the number of columns. this fixes it by "ignoring" that column and just letting it throw later down the line.

Testing done

QTT testing

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@agavra agavra requested a review from spena December 16, 2020 22:32
@agavra agavra requested a review from a team as a code owner December 16, 2020 22:32
Copy link
Member

@spena spena left a comment

Choose a reason for hiding this comment

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

LGTM for a quick fix. However I think we'll need to change the error message in the future. If either the target or resulted schema are too wide and include many complex types (say 30 columns + several nested struct columns), then the error will be huge.

I don't have a message proposal, but I feel we'll need to change it later.

@agavra
Copy link
Contributor Author

agavra commented Dec 17, 2020

Makes sense @spena - I had thought about this too but didn't come up with a great suggestion.

@agavra agavra merged commit 554aef7 into confluentinc:master Dec 17, 2020
@agavra agavra deleted the insert_error_msg branch December 17, 2020 16:21
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.

Exception message not helpful
2 participants