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/10/12 07:36:00 UTC

[jira] [Updated] (CALCITE-6042) Add test cases for ARRAY-related functions by using spark array function rather than array constructor(Spark Library)

     [ https://issues.apache.org/jira/browse/CALCITE-6042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ran Tao updated CALCITE-6042:
-----------------------------
    Summary: Add test cases for ARRAY-related functions by using spark array function rather than array constructor(Spark Library)  (was: Add test cases for ARRAY-related functions by using spark array function(Spark Library))

> Add test cases for ARRAY-related functions by using spark array function rather than array constructor(Spark Library)
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-6042
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6042
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.35.0
>            Reporter: Ran Tao
>            Assignee: Ran Tao
>            Priority: Major
>             Fix For: 1.36.0
>
>
> Currently, we support a serials of Spark ARRAY functions such as ARRAY/ARRAY_DISTINCT/ARRAY_EXCEPT/ARRAY_POSITION/ARRAY_CONTAINS...
> however, the test cases of these functions use calcite array constructor such as
> {code:java}
> array_except(array[2], array[2, 3]) {code}
> We don't have any testcase related to the Spark's array function, however this is actually important. Because these array functions belong to Spark library, and the Spark's array has some different behaviors with calcite's array constructor.
>  # use array(expr, ...) rather than array[expr, ...]
>  # allows empty map such as map(); however calcite map constructor not support it.
>  # spark array supports some special cases such as array(1, 'x') 
> we expect to add some test cases like:
> {code:java}
> array_except(array(2), array(2, 3))  
> array_except(array(2), array())  {code}
> Frankly speaking, if the user activates the spark library, it is more natural for them to use the array() function rather than array[].



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