: Storing RexLiteral as BigDecimal values
Mihai,
I accept your point that literals may have values that are binary floating
point. (As we discussed, they are impossible to create via SQL, but may be
created via constant reduction.)
But I still have a concern that developers will accidentally create
would enable changes in the syntax too, but they can be done separately if
> desired.
>
> Mihai
>
>
> From: Mihai Budiu
> Sent: Tuesday, January 30, 2024 4:00 PM
> To: dev@calcite.apache.org
> Subject: Re: Storing RexLiteral as Big
I think we should start a new thread.
Mihai
From: Stephen Carlin
Sent: Tuesday, January 30, 2024 5:19 PM
To: dev@calcite.apache.org
Subject: Re: Storing RexLiteral as BigDecimal values
I don't know if this is hijacking or adding to the discussion, but figured
ired.
>
> Mihai
>
>
> From: Mihai Budiu
> Sent: Tuesday, January 30, 2024 4:00 PM
> To: dev@calcite.apache.org
> Subject: Re: Storing RexLiteral as BigDecimal values
>
>
> *
> Regarding [1], it looks like the power function im
enable changes in the syntax too, but they can be done separately if
desired.
Mihai
From: Mihai Budiu
Sent: Tuesday, January 30, 2024 4:00 PM
To: dev@calcite.apache.org
Subject: Re: Storing RexLiteral as BigDecimal values
*
Regarding [1], it looks like
le a
JIRA issue to enable this feature.
Thank you,
Mihai
From: Julian Hyde
Sent: Tuesday, January 30, 2024 3:42 PM
To: dev@calcite.apache.org
Subject: Re: Storing RexLiteral as BigDecimal values
In the case of POWER, Postgres has both a decimal and double
.
>
> Mihai
>
> From: Julian Hyde
> Sent: Tuesday, January 30, 2024 3:03 PM
> To: dev@calcite.apache.org
> Subject: Re: Storing RexLiteral as BigDecimal values
>
> It’s surprising to me that 1004.3e0 should have type DOUBLE or REAL; I wou
below, the optimizer will then convert the
double result of power into a BigDecimal, rounding it in the process.
Mihai
From: Julian Hyde
Sent: Tuesday, January 30, 2024 3:03 PM
To: dev@calcite.apache.org
Subject: Re: Storing RexLiteral as BigDecimal values
It’s
lue.
> In FP the result is the wrong one, but that's the semantics of the power
> function in FP.
>
> Mihai
>
> From: Julian Hyde
> Sent: Tuesday, January 30, 2024 2:50 PM
> To: dev@calcite.apache.org
> Subject: Re: Storing RexLiter
Subject: Re: Storing RexLiteral as BigDecimal values
The inputs are decimals, and the correct answer is 1008618.49, also a decimal,
and cannot be exactly represented as a binary floating point. I’m not sure why
in this case you want a binary floating point.
> On Jan 30, 2024, at 2:46 PM, Mi
l.
> This rounding error is not really necessary.
>
> Mihai
>
> From: Julian Hyde
> Sent: Tuesday, January 30, 2024 2:40 PM
> To: dev@calcite.apache.org
> Subject: Re: Storing RexLiteral as BigDecimal values
>
> Can you give a
.
This rounding error is not really necessary.
Mihai
From: Julian Hyde
Sent: Tuesday, January 30, 2024 2:40 PM
To: dev@calcite.apache.org
Subject: Re: Storing RexLiteral as BigDecimal values
Can you give a scenario where a RexLiteral should have a double value
Can you give a scenario where a RexLiteral should have a double value?
> On Jan 30, 2024, at 2:36 PM, Mihai Budiu wrote:
>
> Hello,
>
> I have a question about the representation of RexLiteral values.
> Currently DOUBLE-valued literals are represented using a BigDecimal.
> This causes small
Hello,
I have a question about the representation of RexLiteral values.
Currently DOUBLE-valued literals are represented using a BigDecimal.
This causes small rounding errors, introduced in the RexBuilder.clean()
function.
This causes FP expressions that are evaluated at compilation-time to
14 matches
Mail list logo