[jira] [Commented] (FLINK-31603) Line break should be removed in create table with-clauses, load module with-clauses and table hints for both keys and values

2023-04-07 Thread Jark Wu (Jira)


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

Jark Wu commented on FLINK-31603:
-

Hi [~paul8263], this is an expected behavior in SQL, because there is indeed a 
line break in the string literal. MySQL and other databases also have the same 
behavior. 

{code}
mysql> select 'abc
edf';
+-+
| abc
edf |
+-+
| abc
edf |
+-+
1 row in set (0.01 sec)
{code}

> Line break should be removed in create table with-clauses, load module 
> with-clauses and table hints for both keys and values
> 
>
> Key: FLINK-31603
> URL: https://issues.apache.org/jira/browse/FLINK-31603
> Project: Flink
>  Issue Type: Bug
>  Components: Table SQL / Planner
>Affects Versions: 1.16.0, 1.16.1
> Environment: Flink 1.16.0
>Reporter: Yao Zhang
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.18.0
>
>
> Given a SQL like this:
> {code:sql}
> CREATE TABLE MyTable (
>   `user_id` BIGINT,
>   `name` STRING,
>   `timestamp` TIMESTAMP_LTZ(3) METADATA
> ) WITH (
>   'connector' = 'kaf
> ka'
>   ...
> );
> {code}
> After parsing the SQL, the option value 'connector' is 'kaf\nka', which will 
> lead to problems.
> The line break inside keys/values in with-clauses and table hints should be 
> removed when parsing SQLs.
> If this is the issue that needs to fix, I would like to do it, as I am 
> currently working on it.



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


[jira] [Commented] (FLINK-31603) Line break should be removed in create table with-clauses, load module with-clauses and table hints for both keys and values

2023-03-30 Thread Martijn Visser (Jira)


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

Martijn Visser commented on FLINK-31603:


I would like to understand what the SQL standard says with regards to line 
breaks in a statement. I'm concerned that replacing all line breaks will 
actually introduce a lot of complexity with certain exceptions; why not say 
that a line break is considered a line break and throw a meaningful error that 
the SQL statement is incorrect? I don't think this is a bug; this is a user 
error, not a Flink bug

> Line break should be removed in create table with-clauses, load module 
> with-clauses and table hints for both keys and values
> 
>
> Key: FLINK-31603
> URL: https://issues.apache.org/jira/browse/FLINK-31603
> Project: Flink
>  Issue Type: Bug
>  Components: Table SQL / Planner
>Affects Versions: 1.16.0, 1.16.1
> Environment: Flink 1.16.0
>Reporter: Yao Zhang
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.18.0
>
>
> Given a SQL like this:
> {code:sql}
> CREATE TABLE MyTable (
>   `user_id` BIGINT,
>   `name` STRING,
>   `timestamp` TIMESTAMP_LTZ(3) METADATA
> ) WITH (
>   'connector' = 'kaf
> ka'
>   ...
> );
> {code}
> After parsing the SQL, the option value 'connector' is 'kaf\nka', which will 
> lead to problems.
> The line break inside keys/values in with-clauses and table hints should be 
> removed when parsing SQLs.
> If this is the issue that needs to fix, I would like to do it, as I am 
> currently working on it.



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


[jira] [Commented] (FLINK-31603) Line break should be removed in create table with-clauses, load module with-clauses and table hints for both keys and values

2023-03-27 Thread Yao Zhang (Jira)


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

Yao Zhang commented on FLINK-31603:
---

Hi community,

For some of the properties like 'line.delim' in Hive, users might set the value 
'\n' explicitly. So it might not be a good practice to replace all line breaks 
in with clauses.

We may consider to narrow it down to replacing the line break in Flink Table 
Hints only, which needs some further discussion.

> Line break should be removed in create table with-clauses, load module 
> with-clauses and table hints for both keys and values
> 
>
> Key: FLINK-31603
> URL: https://issues.apache.org/jira/browse/FLINK-31603
> Project: Flink
>  Issue Type: Bug
>  Components: Table SQL / Planner
>Affects Versions: 1.16.0, 1.16.1
> Environment: Flink 1.16.0
>Reporter: Yao Zhang
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.18.0
>
>
> Given a SQL like this:
> {code:sql}
> CREATE TABLE MyTable (
>   `user_id` BIGINT,
>   `name` STRING,
>   `timestamp` TIMESTAMP_LTZ(3) METADATA
> ) WITH (
>   'connector' = 'kaf
> ka'
>   ...
> );
> {code}
> After parsing the SQL, the option value 'connector' is 'kaf\nka', which will 
> lead to problems.
> The line break inside keys/values in with-clauses and table hints should be 
> removed when parsing SQLs.
> If this is the issue that needs to fix, I would like to do it, as I am 
> currently working on it.



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