You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Ran Tao (Jira)" <ji...@apache.org> on 2023/09/27 09:25:00 UTC
[jira] [Comment Edited] (CALCITE-5918) Add MAP function (enabled in Spark library)
[ https://issues.apache.org/jira/browse/CALCITE-5918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17769510#comment-17769510 ]
Ran Tao edited comment on CALCITE-5918 at 9/27/23 9:24 AM:
-----------------------------------------------------------
[~MasseGuillaume] hi, Guillaume, Are you still continuing this work? I'm glad to support this ticket.
I'm asking this because we have added many spark map functions such as map_keys/map_values in calcite 1.35.0. however the test cases of these functions are using the standard calcite map constructor. IMHO. if we have standard array/map, spark array/map, this would be consistent. And user can use all spark map functions.
was (Author: lemonjing):
[~MasseGuillaume] hi, Guillaume, Are you still continuing this work? I'm glad to support this ticket.
I'm asking this because we have added many spark map functions such as map_keys/map_values. however the test cases of these functions are using the standard calcite map constructor. IMHO. if we have standard array/map, spark array/map, this would be consistent. And user can use all spark map functions.
> Add MAP function (enabled in Spark library)
> -------------------------------------------
>
> Key: CALCITE-5918
> URL: https://issues.apache.org/jira/browse/CALCITE-5918
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Affects Versions: 1.35.0
> Reporter: Guillaume Massé
> Priority: Minor
>
> Apache Spark map constructor is different than the standard SQL:
> [https://spark.apache.org/docs/3.4.0/api/sql/index.html#map]
>
> {code:java}
> SELECT map(1.0, '2', 3.0, '4');
> // {1.0:"2",3.0:"4"} {code}
>
> related PR that can help implement this: https://github.com/apache/calcite/pull/3141
--
This message was sent by Atlassian Jira
(v8.20.10#820010)