-
Notifications
You must be signed in to change notification settings - Fork 125
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
SNOW-1799603: add guidance and example on processing Arrow results WithHigherPrecision
#1240
Comments
array.Int
instead of array.Decimal
array.Int
instead of array.Decimal
array.Int
instead of array.Decimal
array.Int
instead of array.Decimal
array.Int
instead of array.Decimal
array.Int
instead of array.Decimal
for NUMBER data
hi - thank you for raising this issue with us. We'll take a look. |
so if we call schema:
fields: 1
- 123.12345: type=int32
metadata: ["logicalType": "FIXED", "precision": "38", "scale": "6", "charLength": "0", "byteLength": "4", "finalType": "T"] we see that the Arrow schema, coming from the server, dictates (The values themselves ( Considering this is all to an expected behaviour, let us know if you need any further help on the matter, otherwise I would like to close it. |
hmm I see. I thought the server would choose the minimal size but still keep the data class. But this is really surprising and hard to use. Now any meaningful processing/consumption on the NUMBER data requires casting/converting the data, which is not straightforward at all and also not efficient. I guess I can't really push for a change here. But perhaps at least these details should be included in the docs. E.g.
|
Hi @datbth ! Arrow batches mode is a low-level mode, which is more performant because it does fewer operations. On the other hand, it is useful for people who either prefer a columnar approach or just pass Arrow to another service - the latter especially find it good that we don't do any unnecessary processing. We mention this compression in our docs: https://github.com/snowflakedb/gosnowflake/blob/master/doc.go#L692 |
array.Int
instead of array.Decimal
for NUMBER dataWithHigherPrecision
Thank you.
I see it now. Sorry for having missed it earlier.
I might be missing something here, but could you give some example services that can process such
If it's indeed a "custom" type that is only used/produced by Snowflake, it should be documented accordingly. |
As for the second part - it is not a canonical format. It is just an |
I see. My point was that the doc did not tell in which case the Int data would have a non-zero scale. |
documentation update merged with #1246. If you don't have any further questions in context with this issue, i would suggest closing it. |
okay thank you |
What version of GO driver are you using?
v1.12.0
What operating system and processor architecture are you using?
Ubuntu 24.04.1 LTS
What version of GO are you using?
go version go1.23.1 linux/amd64
Server version: 8.42.2
What did you do?
WithArrowBatches
andWithHigherPrecision
array.Decimal128
. Printf output:array.Int32
. Prinf output:Can you set logging to DEBUG and collect the logs?
https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors
Before sharing any information, please be sure to review the log and remove any sensitive
information.
The text was updated successfully, but these errors were encountered: