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

Xin Chen commented on FLINK-32188:
----------------------------------

I roughly understand how the framework simplifies SQL to verify that a field 
cannot be equal to two values and connects them using “AND”. 

 !screenshot-10.png! 
 !screenshot-11.png! 

Here, an instance of the Comparison class will be created or null will be 
returned, but only the “Literal” form is considered, without considering the 
existence of the following form for the "operands" of the "RexNode e" passed in:

{code:java}
CAST(ARRAY(_UTF-16LE'ccc.jpg', _UTF-16LE'ddd.jpg')):VARCHAR(2147483647) 
CHARACTER SET "UTF-16LE" ARRAY NOT NULL
{code}
So when the array is passed in, null is returned here, but the string correctly 
returns an instance of comparison. I think this is a significant difference. In 
the subsequent code logic, comparison will be used to verify that a field 
cannot be connected to two different values with “AND” in condition.

> Does the custom connector not support pushing down "where" query predicates 
> to query fields of array type?
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-32188
>                 URL: https://issues.apache.org/jira/browse/FLINK-32188
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.12.2, 1.17.0, 1.16.1
>            Reporter: Xin Chen
>            Priority: Major
>         Attachments: image-2023-05-25-17-16-02-288.png, 
> image-2023-05-25-20-44-08-834.png, image-2023-05-25-20-44-47-581.png, 
> screenshot-1.png, screenshot-10.png, screenshot-11.png, screenshot-2.png, 
> screenshot-3.png, screenshot-4.png, screenshot-5.png, screenshot-6.png, 
> screenshot-7.png, screenshot-8.png, screenshot-9.png
>
>
> When I customized a data source connector which assumed as image-connector, I 
> found that when creating a table with ddl, I specified a field URL as an 
> array type. When submitting an SQL task with Flink, I specified query this 
> field as a fixed array. For example, select * from image source where 
> URL=ARRAY ['/flink. jpg', '/flink_1. jpg'], but it couldn't obtain the 
> corresponding predicate filters at all.
> Does the custom connector not support  to query fields of array type with 
> "where"?



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

Reply via email to