-
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-1300150:Automatic schema inference for CSV loading option unclear #1521
Conversation
0ceb10f
to
c1471fd
Compare
In this PR, we only set default infer_schema as true when reading csv file. If we do this to json file, there is a breaking change |
@@ -421,6 +418,7 @@ def csv(self, path: str) -> DataFrame: | |||
schema_to_cast = [("$1", "C1")] | |||
transformations = [] | |||
else: | |||
self._cur_options["INFER_SCHEMA"] = False |
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.
this condition will already be true if we reach the else branch, right?
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.
No, if we reach here, user must have provide a schema, in that way, we should use what user provide and turn off infer_schema
CHANGELOG.md
Outdated
- Improved error message to remind users set `{"infer_schema":True}` when read csv file without specifying its 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.
- Improved error message to remind users set `{"infer_schema":True}` when read csv file without specifying its schema.ß | |
- Improved error message to remind users set `{"infer_schema": True}` when reading csv file without specifying its schema. | |
nit
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1300150
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Please write a short description of how your code change solves the related issue.