Sunyue commented on issue #446:
URL: https://github.com/apache/arrow-go/issues/446#issuecomment-3139291534

   > Ah, I see where I missed the `literalToDatum`. I'll fix that one 😄
   > 
   > As for Decimal256, the issue there is that Substrait explicitly does not 
support Decimal256, the precision for substrait decimal maxes out at 38, i.e. 
Decimal128, which is why the conversion hard codes to decimal128.
   
   @zeroshade For Decimal256, not sure if it is a good idea, but until 
substrait supports Decimal256, can we use substrait's `types.UserDefinedType` 
for Decimal256? The idea is:
   
   - In `ToSubstraitType` return `types.UserDefinedType` for Decimal256, maybe 
put precision and scale into the `TypeParameters`?
   - In `literalToDatum` use `ext.DecodeTypeArrow(t.TypeReference)` to decode 
the user defined type, if it is decimal256, then convert it back using the 
information that we store in the user defined type.
   The only thing is for different precision/scale, user need to call 
`ExtensionIDRegistry.RegisterType` for each different combination, so that we 
can `EncodeType` and `DecodeTypeArrow`.
   What do you think?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to