[ 
https://issues.apache.org/jira/browse/IGNITE-20311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maksim Zhuravkov updated IGNITE-20311:
--------------------------------------
    Description: 
The return type for ROUND(N)/ROUND(N, s) is equal to the type of `N`, which 
causes issues when reading data from a `BinaryTuple` because this way 
ROUND(DECIMAL(2,1)) has return type DECIMAL(2,1):

{code}
  SELECT ROUND(1.7)
  # Although the implementation of the round function produces 2, RowSchema has 
NativeType (precision=2, scale=1).
  # Because of that this query returns 2.0 
{code}
     

  was:
The return type for ROUND(N)/ROUND(N, s) is equal to the type of `N`, which 
causes issues when reading data from a `BinaryTuple` because this way 
ROUND(DECIMAL(2,1)) has return type DECIMAL(2,1):

{code}
  SELECT ROUND(1.7)
  # Although the implementation of the round function produces 2
  # RowSchema has NativeType (precision=2, scale=1).
  # And because of that read operation returns 2.0 
  # returns 2.0
{code}
     


> Sql. Handle return type of ROUND. 
> ----------------------------------
>
>                 Key: IGNITE-20311
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20311
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Maksim Zhuravkov
>            Priority: Minor
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>
> The return type for ROUND(N)/ROUND(N, s) is equal to the type of `N`, which 
> causes issues when reading data from a `BinaryTuple` because this way 
> ROUND(DECIMAL(2,1)) has return type DECIMAL(2,1):
> {code}
>   SELECT ROUND(1.7)
>   # Although the implementation of the round function produces 2, RowSchema 
> has NativeType (precision=2, scale=1).
>   # Because of that this query returns 2.0 
> {code}
>      



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to