[jira] [Commented] (CALCITE-5884) Description of ARRAY_TO_STRING function is incomplete

2023-10-19 Thread Julian Hyde (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-5884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1373#comment-1373
 ] 

Julian Hyde commented on CALCITE-5884:
--

I have reviewed.

A better summary, in my opinion, is "ARRAY_TO_STRING function should return 
NULL if its 'nullValue' argument is NULL". It says what was wrong about the 
description, and what the correct and new behavior is.

> Description of ARRAY_TO_STRING function is incomplete
> -
>
> Key: CALCITE-5884
> URL: https://issues.apache.org/jira/browse/CALCITE-5884
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.35.0
>Reporter: Mihai Budiu
>Assignee: Mihai Budiu
>Priority: Trivial
>  Labels: pull-request-available
> Fix For: 1.36.0
>
>
> This is the current definition of the function ARRAY_TO_STRING in 
> SqlLibraryOperators:
> {code:java}
>   /** The "ARRAY_TO_STRING(array, delimiter [, nullText ])" function. */
>   @LibraryOperator(libraries = {BIG_QUERY})
>   public static final SqlFunction ARRAY_TO_STRING =
>   SqlBasicFunction.create(SqlKind.ARRAY_TO_STRING,
>   ReturnTypes.VARCHAR_NULLABLE,
>   OperandTypes.STRING_ARRAY_CHARACTER_OPTIONAL_CHARACTER);
> {code}
> So the result is nullable if any of the arguments is nullable. However, the 
> nullability of the last argument does not influence the result nullabillity: 
> a NULL value for the third optional argument will not cause a NULL value to 
> be output.



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


[jira] [Commented] (CALCITE-5884) Description of ARRAY_TO_STRING function is incomplete

2023-10-18 Thread Benchao Li (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-5884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17776974#comment-17776974
 ] 

Benchao Li commented on CALCITE-5884:
-

The PR seems ready and trivial, anyone on this thread would like to review it?

> Description of ARRAY_TO_STRING function is incomplete
> -
>
> Key: CALCITE-5884
> URL: https://issues.apache.org/jira/browse/CALCITE-5884
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.35.0
>Reporter: Mihai Budiu
>Assignee: Mihai Budiu
>Priority: Trivial
>  Labels: pull-request-available
> Fix For: 1.36.0
>
>
> This is the current definition of the function ARRAY_TO_STRING in 
> SqlLibraryOperators:
> {code:java}
>   /** The "ARRAY_TO_STRING(array, delimiter [, nullText ])" function. */
>   @LibraryOperator(libraries = {BIG_QUERY})
>   public static final SqlFunction ARRAY_TO_STRING =
>   SqlBasicFunction.create(SqlKind.ARRAY_TO_STRING,
>   ReturnTypes.VARCHAR_NULLABLE,
>   OperandTypes.STRING_ARRAY_CHARACTER_OPTIONAL_CHARACTER);
> {code}
> So the result is nullable if any of the arguments is nullable. However, the 
> nullability of the last argument does not influence the result nullabillity: 
> a NULL value for the third optional argument will not cause a NULL value to 
> be output.



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


[jira] [Commented] (CALCITE-5884) Description of ARRAY_TO_STRING function is incomplete

2023-09-05 Thread Mihai Budiu (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-5884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17762224#comment-17762224
 ] 

Mihai Budiu commented on CALCITE-5884:
--

Can someone please review this PR?


> Description of ARRAY_TO_STRING function is incomplete
> -
>
> Key: CALCITE-5884
> URL: https://issues.apache.org/jira/browse/CALCITE-5884
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.35.0
>Reporter: Mihai Budiu
>Priority: Trivial
>  Labels: pull-request-available
>
> This is the current definition of the function ARRAY_TO_STRING in 
> SqlLibraryOperators:
> {code:java}
>   /** The "ARRAY_TO_STRING(array, delimiter [, nullText ])" function. */
>   @LibraryOperator(libraries = {BIG_QUERY})
>   public static final SqlFunction ARRAY_TO_STRING =
>   SqlBasicFunction.create(SqlKind.ARRAY_TO_STRING,
>   ReturnTypes.VARCHAR_NULLABLE,
>   OperandTypes.STRING_ARRAY_CHARACTER_OPTIONAL_CHARACTER);
> {code}
> So the result is nullable if any of the arguments is nullable. However, the 
> nullability of the last argument does not influence the result nullabillity: 
> a NULL value for the third optional argument will not cause a NULL value to 
> be output.



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


[jira] [Commented] (CALCITE-5884) Description of ARRAY_TO_STRING function is incomplete

2023-08-03 Thread Mihai Budiu (Jira)


[ 
https://issues.apache.org/jira/browse/CALCITE-5884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17750905#comment-17750905
 ] 

Mihai Budiu commented on CALCITE-5884:
--

I have updated the issue name to reflect that this is not a bug in the 
implementation but one in the specification. I will amend the PR 
correspondingly.

> Description of ARRAY_TO_STRING function is incomplete
> -
>
> Key: CALCITE-5884
> URL: https://issues.apache.org/jira/browse/CALCITE-5884
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.35.0
>Reporter: Mihai Budiu
>Priority: Trivial
>  Labels: pull-request-available
>
> This is the current definition of the function ARRAY_TO_STRING in 
> SqlLibraryOperators:
> {code:java}
>   /** The "ARRAY_TO_STRING(array, delimiter [, nullText ])" function. */
>   @LibraryOperator(libraries = {BIG_QUERY})
>   public static final SqlFunction ARRAY_TO_STRING =
>   SqlBasicFunction.create(SqlKind.ARRAY_TO_STRING,
>   ReturnTypes.VARCHAR_NULLABLE,
>   OperandTypes.STRING_ARRAY_CHARACTER_OPTIONAL_CHARACTER);
> {code}
> So the result is nullable if any of the arguments is nullable. However, the 
> nullability of the last argument does not influence the result nullabillity: 
> a NULL value for the third optional argument will not cause a NULL value to 
> be output.



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