You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Caican Cai (Jira)" <ji...@apache.org> on 2024/04/04 14:58:00 UTC
[jira] [Commented] (CALCITE-6352) The map_contains_key function may return true when the key and mapkeytype types are different.
[ https://issues.apache.org/jira/browse/CALCITE-6352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17833966#comment-17833966 ]
Caican Cai commented on CALCITE-6352:
-------------------------------------
[~mbudiu] I think this is also inconsistent with the common sense of compilation principles, but spark does return true
> The map_contains_key function may return true when the key and mapkeytype types are different.
> ----------------------------------------------------------------------------------------------
>
> Key: CALCITE-6352
> URL: https://issues.apache.org/jira/browse/CALCITE-6352
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.36.0
> Reporter: Caican Cai
> Priority: Critical
> Fix For: 1.37.0
>
>
>
> {code:java}
> scala> val df = spark.sql("select map_contains_key(map(1, 'a', 2, 'b'), 2.0)")
> val df: org.apache.spark.sql.DataFrame = [map_contains_key(map(1, a, 2, b), 2.0): boolean]
> scala> df.show()
> +--------------------------------------+
> |map_contains_key(map(1, a, 2, b), 2.0)|
> +--------------------------------------+
> | true|
> +--------------------------------------+
> {code}
> calcite return false
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)