neilconway commented on PR #22482:
URL: https://github.com/apache/datafusion/pull/22482#issuecomment-4530981145

   > The main question is whether we should use a decimal or a float output 
type.
   From a quick skim, analytical engines use float output types for the decimal 
inputs. The major exception is Postgres - it preserves decimal types
   
   `numeric`/`decimal` in Postgres is arbitrary precision and can represent 
exceptional values like `NaN`, so I think it's somewhat different (no risk of 
overflow, etc.)
   
   We could follow DuckDB and others by *always* returning a float output type, 
but to me it seems unfortunate to lose exact precision for the `power(decimal, 
integer)` case.
   
   > Also, with `parse_float_as_decimal`, we promote the second argument to 
decimal - would it work?
   
   AFAIK this PR should work fine in that scenario (I'm working on this in part 
because I want to flip `parse_float_as_decimal` to true by default in the 
future). But lmk if I misunderstood your question.


-- 
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