You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2023/01/02 07:45:00 UTC

[jira] [Updated] (IMPALA-11696) Incorrect warnings when creating text/sequence table with row format delimiters

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

Quanlong Huang updated IMPALA-11696:
------------------------------------
    Target Version: Impala 4.1.2  (was: Impala 4.3.0)

> Incorrect warnings when creating text/sequence table with row format delimiters
> -------------------------------------------------------------------------------
>
>                 Key: IMPALA-11696
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11696
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 4.1.0, Impala 4.2.0, Impala 4.1.1
>            Reporter: Quanlong Huang
>            Assignee: Quanlong Huang
>            Priority: Major
>             Fix For: Impala 4.3.0
>
>
> IMPALA-9822 adds a warning when the customized row format delimiters in the CreateTable statement is ignored. However, we see the same warning when creating TEXT or SEQUENCE_FILE tables.
> {code:sql}
> [localhost:21050] default> create external table my_csv (a int, b string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' stored as textfile;
> Query: create external table my_csv (a int, b string) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' stored as textfile
> +-------------------------+
> | summary                 |
> +-------------------------+
> | Table has been created. |
> +-------------------------+
> WARNINGS: 'ROW FORMAT DELIMITED FIELDS TERMINATED BY ','' is ignored.
> Fetched 1 row(s) in 0.11s {code}
> The following code is buggy:
> {code:java}
>     if (getRowFormat() != null) {
>       String fieldDelimiter = getRowFormat().getFieldDelimiter();
>       String lineDelimiter = getRowFormat().getLineDelimiter();
>       String escapeChar = getRowFormat().getEscapeChar();
>       if (getFileFormat() != THdfsFileFormat.TEXT
>           || getFileFormat() != THdfsFileFormat.SEQUENCE_FILE) {  // Should use && instead
>         if (fieldDelimiter != null) {
>           analyzer.addWarning("'ROW FORMAT DELIMITED FIELDS TERMINATED BY '"
>               + fieldDelimiter + "'' is ignored.");
>         }
>         if (lineDelimiter != null) {
>           analyzer.addWarning("'ROW FORMAT DELIMITED LINES TERMINATED BY '"
>               + lineDelimiter + "'' is ignored.");
>         }
>         if (escapeChar != null) {
>           analyzer.addWarning(
>               "'ROW FORMAT DELIMITED ESCAPED BY '" + escapeChar + "'' is ignored.");
>         }
>       }
>     }
> {code}
> https://github.com/apache/impala/blob/8271bdd587d241cd5a61ccae7422bbb5fafcfaf7/fe/src/main/java/org/apache/impala/analysis/CreateTableStmt.java#L276



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org