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

luoyuxia commented on FLINK-29657:
----------------------------------

When support hive dialect, we follow Hive 2.3's behavior since it's wide-used 
and stable , so we may miss some thing in other versions.

But for your problem, it's quick to fix. We just need to adjust the  logic in 
`NumExprProcessor#process`

> Flink hive parser considers literal floating point number differently than 
> Hive SQL
> -----------------------------------------------------------------------------------
>
>                 Key: FLINK-29657
>                 URL: https://issues.apache.org/jira/browse/FLINK-29657
>             Project: Flink
>          Issue Type: Sub-task
>            Reporter: Runkang He
>            Priority: Major
>
> Hive SQL consider literal floating number(such as 1.1) as double, but Flink 
> hive parser consider this as decimal, so it causes that some hive udf that 
> accepts double arg, will not pass type check in hive parser.
> Hive SQL's behavior:
> hive> explain select 1.1 + false;
> 2022-10-17 16:37:14,286    FAILED: SemanticException [Error 10014]: Line 1:15 
> Wrong arguments 'false': No matching method for class 
> org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNumericPlus with 
> ({*}double{*}, boolean)
> Flink hive parser's behavior:
> in NumExprProcessor#process, it process non-postfix number as decimal by 
> default.



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

Reply via email to