-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Be looser about case when checking schemas
This fixes a couple bugs: - We were not lower-casing the result of asking DuckDB for its schema. So we were searching inside its schema results for the exact camel case string in duckdb but Athena would need a lower case string. Impossible to work in both. So double-word depth-two-fields would never be matched. - For depth-two fields, we were also assuming that we would be given fields in the same order that the SQL table would return them. So if you didn't provide them in that precise order (like if you used start, end but the SQL table had end, start -- you'd miss one). This was the exact case for Encounter fields in duckdb. This commit allows the following new features/conveniences: - Case-insensitive schema lookups (i.e. table name and column name arguments to get_column_datatype_query() can be any case) - Case-insensitive schema validation (i.e. the expected column names passed to validate_table_schema() can be any case) - The resulting validated schema will use the original case used by the expected-fields dictionary. So that the user will not be surprised and we'll use camel case if they do, lower case if they do.
- Loading branch information
Showing
7 changed files
with
96 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.