[ 
https://issues.apache.org/jira/browse/KYLIN-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16997073#comment-16997073
 ] 

Dong Zhen commented on KYLIN-4274:
----------------------------------

SQL has been provided, and the return result has also been provided. Note that 
the field FIRSTORDERVALUE is of type varchar in hive.

My guess is that there was a problem with the cast function after converting 
the varchar field, so the result became very strange when making subsequent 
comparisons.

> Calculate the number of records in a column greater than the specified value
> ----------------------------------------------------------------------------
>
>                 Key: KYLIN-4274
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4274
>             Project: Kylin
>          Issue Type: Bug
>         Environment: Kylin 2.6.3
>            Reporter: Dong Zhen
>            Priority: Blocker
>         Attachments: image-2019-12-16-15-55-47-075.png, 
> image-2019-12-16-15-57-05-897.png, image-2019-12-16-15-58-23-820.png
>
>
> Query: SELECT COUNT(1) FROM TAGS_MBR_MEMBER_BUY_INFO Result: 18890197
> Query: SELECT COUNT(1) FROM TAGS_MBR_MEMBER_BUY_INFO WHERE 
> CAST(FIRSTORDERVALUE AS DOUBLE) <= 99 Result: 18729902
> Query: SELECT COUNT(1) FROM TAGS_MBR_MEMBER_BUY_INFO WHERE 
> CAST(FIRSTORDERVALUE AS DOUBLE) <= 100 Result: 317493
> Query: SELECT COUNT(1) FROM TAGS_MBR_MEMBER_BUY_INFO WHERE 
> CAST(FIRSTORDERVALUE AS DOUBLE) <= 101 Result: 425372
> FIRSTORDERVALUE field is of type varchar.
> What's the situation?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to