-
Notifications
You must be signed in to change notification settings - Fork 117
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-966485 Fix reader schema with metadata columns #1143
Conversation
Description Dataframe Reader does not change the schema query when metadata column is involved, so further actions like save_as_table could fail because the created table schema does not match the query. This fix adds the metadata columns to the beginning of the schema, to be consistent with the query. Testing integ test
for metadata_col in metadata_columns | ||
] + schema |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for metadata_col in metadata_columns | |
] + schema | |
for metadata_col in metadata_columns or [] | |
] + schema |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is could be why some tests are failing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I also realized the same after observing the test failure lol
I don't understand the type checking failure. It does not fail on my laptop:
Specifically, I moved some code block from a file that is not covered by pyright to a file that is covered. But the error message is very confusing.
I don't understand how
If |
try running |
🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 🚢
Description
Dataframe Reader does not change the schema query when metadata column is involved, so further actions like save_as_table could fail because the created table schema does not match the query.
This fix adds the metadata columns to the beginning of the schema, to be consistent with the query.
Testing
integ test
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-966485
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Dataframe Reader does not change the schema query when metadata column is involved, so further actions like save_as_table could fail because the created table schema does not match the query.
This fix adds the metadata columns to the beginning of the schema, to be consistent with the query.