-
Notifications
You must be signed in to change notification settings - Fork 513
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
[gcp] Fix BQ BIGNUMERIC type support #5428
Conversation
0f972d0
to
e09ffa0
Compare
s"POINT($i $i)", // geography is not an avro logical type | ||
s"""{"value":$i}""" // json is not an avro logical type |
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.
I found out that BQ adds custom sqlType
property to the schema. We can reconstruct the original type
q"""(r: _root_.org.apache.avro.generic.GenericRecord) => { | ||
import _root_.scala.jdk.javaapi.CollectionConverters._ | ||
${constructor(tpe, tn)} |
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 is technically an Ident(TermName("r"))
, adapt macro
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.
nice!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5428 +/- ##
==========================================
+ Coverage 61.09% 61.12% +0.03%
==========================================
Files 310 311 +1
Lines 11060 11075 +15
Branches 769 764 -5
==========================================
+ Hits 6757 6770 +13
- Misses 4303 4305 +2 ☔ View full report in Codecov by Sentry. |
BIGNUMERIC
is currently not properly supported.toTable
cannot infer a schema of typeBIGNUMERIC
BIGNUMERIC
table returns badly convertedBigDecimal
(using wrong scale/precision)Introduce new type
BigNumeric
to solve this issue