[
https://issues.apache.org/jira/browse/FLINK-29657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17618779#comment-17618779
]
luoyuxia commented on FLINK-29657:
----------------------------------
Just a quick question, what's the hive version are you using? I guess some
lower version that 2.3.
Actaully, since Hive 2.3, literal floating number(such as 1.1) has been
considered as {*}decimal type{*}. You can refer to
[HIVE-13945|https://issues.apache.org/jira/browse/HIVE-13945] for more detail.
I tried with Hive 2.3, the exception message will be
{code:java}
FAILED: SemanticException [Error 10014]: Line 1:8 Wrong arguments 'false': No
matching method for class
org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNumericPlus with
(decimal(2,1), boolean) {code}
> 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)