[jira] [Commented] (FLINK-33449) Support array_contains_seq function

2023-12-13 Thread xuyang (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-33449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17796532#comment-17796532
 ] 

xuyang commented on FLINK-33449:


Hi, [~leoyy] thanks for driving this. IMO, this type of function is very 
useful, and I'm +1 to support this function.

However, the function names in some database or big data system are different. 
Take examples of the systems you mentioned as following.

1. Clickhouse `hasAll(set, subset)`

2. Trino `contains_sequence(x, seq)`

3. Starrocks `array_contains_all(arr1, arr2)`

The function names are not unified. In Flink, there has been a function named 
`ARRAY_CONTAINS(haystack, needle)` to check if the given element exists in an 
array. What about using `ARRAY_CONTAINS_ALL` to implement the function in this 
JIRA?

For a more formal process, maybe a discussion mail thread should be started in 
dev maillist.

Look for your thought. cc [~martijnvisser] 

> Support array_contains_seq function
> ---
>
> Key: FLINK-33449
> URL: https://issues.apache.org/jira/browse/FLINK-33449
> Project: Flink
>  Issue Type: New Feature
>Reporter: leo cheng
>Priority: Minor
>  Labels: pull-request-available
>
> support function array_contains_seq like trino contains_sequence
> trino: 
> https://trino.io/docs/current/functions/array.html?highlight=contains_sequence#contains_sequence



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


[jira] [Commented] (FLINK-33449) Support array_contains_seq function

2023-12-14 Thread leo cheng (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-33449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17796606#comment-17796606
 ] 

leo cheng commented on FLINK-33449:
---

Hi [~xuyangzhong] Thank you for your reply

ARRAY_CONTAINS_SEQ function in StarRocks ans trino to checks whether `arr2` is 
a subset of `arr1` and in the same exact order. if and only if {{{}array1 = 
prefix + array2 + suffix{}}}.

ARRAY_CONTAINS_ALL function in StarRocks and clickhouse to checks whether 
`arr2` is a subset of `arr1` , but not need to in the same exact order.

Also, if we need to support ARRAY_CONTAINS_ALL , i can try to implement it in 
flink.

Thank you very much.

> Support array_contains_seq function
> ---
>
> Key: FLINK-33449
> URL: https://issues.apache.org/jira/browse/FLINK-33449
> Project: Flink
>  Issue Type: New Feature
>Reporter: leo cheng
>Priority: Minor
>  Labels: pull-request-available
>
> support function array_contains_seq like trino contains_sequence
> trino: 
> https://trino.io/docs/current/functions/array.html?highlight=contains_sequence#contains_sequence



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


[jira] [Commented] (FLINK-33449) Support array_contains_seq function

2023-12-14 Thread xuyang (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-33449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17796978#comment-17796978
 ] 

xuyang commented on FLINK-33449:


Hi, [~leoyy] , thanks for your explanation.

After your description, I think the name ARRAY_CONTAINS_SEQ is OK. From a more 
common perspective, ARRAY_CONTAINS_ALL may be more general. But without this 
background, it would be difficult to distinguish them based on their names and 
correctly recognize their respective abilities, which is not user-friendly.

I'm neutral on starting a short discussion in dev maillist to see if others 
have better ideas. WDYT?

> Support array_contains_seq function
> ---
>
> Key: FLINK-33449
> URL: https://issues.apache.org/jira/browse/FLINK-33449
> Project: Flink
>  Issue Type: New Feature
>Reporter: leo cheng
>Priority: Minor
>  Labels: pull-request-available
>
> support function array_contains_seq like trino contains_sequence
> trino: 
> https://trino.io/docs/current/functions/array.html?highlight=contains_sequence#contains_sequence



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


[jira] [Commented] (FLINK-33449) Support array_contains_seq function

2023-12-18 Thread leo cheng (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-33449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17798100#comment-17798100
 ] 

leo cheng commented on FLINK-33449:
---

Hi [~xuyangzhong] Thank you

Pls do it.

> Support array_contains_seq function
> ---
>
> Key: FLINK-33449
> URL: https://issues.apache.org/jira/browse/FLINK-33449
> Project: Flink
>  Issue Type: New Feature
>Reporter: leo cheng
>Priority: Minor
>  Labels: pull-request-available
>
> support function array_contains_seq like trino contains_sequence
> trino: 
> https://trino.io/docs/current/functions/array.html?highlight=contains_sequence#contains_sequence



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


[jira] [Commented] (FLINK-33449) Support array_contains_seq function

2023-12-18 Thread Martijn Visser (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-33449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17798135#comment-17798135
 ] 

Martijn Visser commented on FLINK-33449:


I think a Dev ML discussion makes sense, I would probably vote for 
ARRAY_CONTAINS_SEQUENCE 

> Support array_contains_seq function
> ---
>
> Key: FLINK-33449
> URL: https://issues.apache.org/jira/browse/FLINK-33449
> Project: Flink
>  Issue Type: New Feature
>Reporter: leo cheng
>Priority: Minor
>  Labels: pull-request-available
>
> support function array_contains_seq like trino contains_sequence
> trino: 
> https://trino.io/docs/current/functions/array.html?highlight=contains_sequence#contains_sequence



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