-
Notifications
You must be signed in to change notification settings - Fork 238
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
Data type macros #380
Data type macros #380
Conversation
TestTypeInt and TestTypeFloat were failing because we infer/load numeric columns with decimals as dbt-spark/dbt/adapters/spark/impl.py Lines 92 to 95 in 48e1989
Whereas the type macros are returning For now, skip inference and just set the types we want in each seed. |
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.
👍
# need to explicitly cast this to avoid it being inferred/loaded as a DOUBLE on Spark | ||
# in SparkSQL, the two are equivalent for `=` comparison, but distinct for EXCEPT comparison |
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.
That is unfortunate behavior.
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.
Agreed — the distinction between =
and EXCEPT
doesn't make much sense to me, but I'm sure there is a reason (or was, at some point)
### Description Ports tests in the upstream: Data type macros (dbt-labs/dbt-spark#380) Co-authored-by: Jeremy Cohen <jeremy@dbtlabs.com>
### Description Ports tests in the upstream: Data type macros (dbt-labs/dbt-spark#380) Co-authored-by: Jeremy Cohen <jeremy@dbtlabs.com>
* Run tests for data type macros. Fine tune numeric_type * Hard code seed loading types for float + int * Repoint, fixup, changelog entry
See dbt-labs/dbt-core#5428