You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2023/04/21 01:09:00 UTC
[jira] [Comment Edited] (CALCITE-5624) Add ARRAY function (enabled in Spark library)
[ https://issues.apache.org/jira/browse/CALCITE-5624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17714784#comment-17714784 ]
Julian Hyde edited comment on CALCITE-5624 at 4/21/23 1:08 AM:
---------------------------------------------------------------
[~MasseGuillaume], nice work. I have revised a little; see [julianhyde/5624-spark-array|https://github.com/julianhyde/calcite/tree/5624-spark-array]. If this looks good, I'll merge to main.
was (Author: julianhyde):
[~MasseGuillaume], nice work. I have revised a little; see [/julianhyde/5624-spark-array|https://github.com/julianhyde/calcite/tree/5624-spark-array]. If this looks good, I'll merge to main.
> Add ARRAY function (enabled in Spark library)
> ---------------------------------------------
>
> Key: CALCITE-5624
> URL: https://issues.apache.org/jira/browse/CALCITE-5624
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.34.0
> Reporter: Guillaume Massé
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
> The following query is valid in Apache Spark.
> {code:java}
> spark-shell
> scala> spark.sql("""select array(1, 2, 3)""")
> res1: org.apache.spark.sql.DataFrame = [array(1, 2, 3): array<int>]{code}
> However, it would fail to parse in Apache Calcite
>
> AtomicRowExpression should not have ArrayConstructor for Apache Spark. Arrays are constructed by calling the array function ([https://spark.apache.org/docs/latest/api/sql/index.html#array]).
>
> {code:java}
> array()
> array(1)
> array(1, 2, 3){code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)