You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Denys Ordynskiy (JIRA)" <ji...@apache.org> on 2019/07/08 16:48:00 UTC

[jira] [Closed] (DRILL-6713) Infinite loop when retrieving decimal value with scale = -1

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

Denys Ordynskiy closed DRILL-6713.
----------------------------------

Successfully verified.
Queries like {color:red}./querySubmitter query='select cast('999999999999999999' as decimal(38,0)) + cast('999999999999999999' as decimal(38,0)) from (values(1))' type=sql connectStr=local=localhost:31010 api=async logLevel=trace user=usr password=passw{color} going to the infinite loop on Drill before fix and successfully returns the result on the Drill with this fix.

> Infinite loop when retrieving decimal value with scale = -1
> -----------------------------------------------------------
>
>                 Key: DRILL-6713
>                 URL: https://issues.apache.org/jira/browse/DRILL-6713
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - C++
>    Affects Versions: 1.14.0
>            Reporter: Rob Wu
>            Assignee: Volodymyr Vysotskyi
>            Priority: Major
>             Fix For: 1.15.0
>
>
>  
> The server returns scale value of -1 for this query
> select cast('999999999999999999' as decimal(18,0)) + cast('9999999999999999999999999999999999999' as decimal(38,0)) from (values(1))
>  
> The getValueAt() function did not take into account of the possibility of -1 scale and will go into infinite loop of appending 0 to the string buffer.
> [https://github.com/apache/drill/blob/1.14.0/contrib/native/client/src/include/drill/recordBatch.hpp#L752]
>  
> This can be reproduced query submitter.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)