drin commented on issue #17970:
URL: https://github.com/apache/datafusion/issues/17970#issuecomment-3382495852

   I just want to note that I also tried the following syntax around the 
literal value:
   ```sql
   (DECIMAL '18446744073709551616')::DECIMAL(65)
   ```
   
   and I see this in the decoded logical plan:
   ```
   CAST(CAST(Utf8("18446744073709551616") AS Decimal128(38, 10)) AS 
Decimal256(65, 0))
   ```
   
   which still ends up with similar issues. I am pretty sure that if the 
literal were parsed to an integer rather than a float (e.g. DECIMAL128(38, 0)) 
this approach would also solve the issue.
   
   I looked at https://github.com/apache/datafusion/pull/13806 and the source 
but couldn't figure out where parsing from a typical string to a bigdecimal 
then to a decimal128 or decimal256 is implemented


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to