-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework data types handling inside our SDK: - Extract in a separate package with two main entry points: - `func ParseDataType(raw string) (DataType, error)` - responsible for proper datatype parsing and storing the attributes If any (falling to the hardcoded default for now - this is a continuation from #3020 where diff suppressions for number and text types were set exactly this way; for V1 we should stay with hardcoded defaults and we can think of improving them later on without the direct influence on our users) - `func AreTheSame(a DataType, b DataType) bool` - responsible for comparing any two data types; used mostly for diff suppressions and changes discovery - Replace all invocations of the old `ToDataType` in a compatible way (temporary function `LegacyDataTypeFrom` that underneath calls `ToLegacyDataTypeSql()` which returns the same output as old data types used two) - Test on the integration level the consistency of data types' behavior with Snowflake docs - Use new parser and comparator in validation and diff suppression functions (replacing the old ones in all resources) Next steps/future improvements: - Use new DataType in SDK SQL builder - Replace the rest of the old DataType usages (especially in the SDK Requests/Opts) - Tackle SNOW-1596962 TODOs regarding VECTOR type - Improve parsing functions for lists of arguments (and defaults) - will be done on a case-by-case basis with all the resources - Clean up the code in new data types (TODOs with SNOW-1843440)
- Loading branch information
1 parent
04f6d54
commit 05ada91
Showing
54 changed files
with
2,627 additions
and
640 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
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
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.