-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Explicit error with unsupported files #10
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
base: develop
Are you sure you want to change the base?
Conversation
src/duckdb_read_stat.c
Outdated
| data->file_format = DUCKDB_READ_STAT_FILE_FORMAT_STATA; | ||
| error = readstat_parse_dta(parser, path, data); | ||
| } | ||
| else if (!strcmp(format, "sas7cdat")) |
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.
@krlmlr This is not the right extension for a SAS catalog file, you want sas7bcat instead.
src/duckdb_read_stat.c
Outdated
| } | ||
| else if (!strcmp(format, "sas7cdat")) | ||
| { | ||
| duckdb_bind_set_error(info, "SAS catalog files (.sas7cdat) are not supported. Only SAS data files (.sas7bdat, .xpt) are supported."); |
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.
@krlmlr The same here: you want sas7bcat instead.
src/duckdb_read_stat.c
Outdated
| data->file_format = DUCKDB_READ_STAT_FILE_FORMAT_STATA; | ||
| error = readstat_parse_dta(parser, path, data); | ||
| } | ||
| else if (duckdb_read_stat_ends_with(path, ".sas7cdat")) |
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.
@krlmlr The same here: you want .sas7bcat instead.
src/duckdb_read_stat.c
Outdated
| } | ||
| else if (duckdb_read_stat_ends_with(path, ".sas7cdat")) | ||
| { | ||
| duckdb_bind_set_error(info, "SAS catalog files (.sas7cdat) are not supported. Only SAS data files (.sas7bdat, .xpt) are supported."); |
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.
@krlmlr The same here: you want .sas7bcat instead.
|
Thanks, fixed. Would you like to share advice on running the tests locally? |
For #5.
When I try to run tests, I see:
Happy to add tests once I understand how to run them, perhaps also on CI/CD?