Zoltán Borók-Nagy created IMPALA-11215:
------------------------------------------

             Summary: Impala shows invalid warning about row formats when 
TEXTFILE or SEQUENCEFILE is used
                 Key: IMPALA-11215
                 URL: https://issues.apache.org/jira/browse/IMPALA-11215
             Project: IMPALA
          Issue Type: Bug
          Components: Frontend
            Reporter: Zoltán Borók-Nagy


Reproduce:

 
{noformat}
[localhost:21050] default> create table delim(i int) ROW FORMAT DELIMITED 
FIELDS TERMINATED BY ',' stored as textfile;
Query: create table delim(i int) 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 153.82s
{noformat}

The WARNING is invalid since the row format is not ignored for text files.

The problem is coming from this line:

[https://github.com/apache/impala/blob/38062b4ec0cfdf28474c84d136718510fe712437/fe/src/main/java/org/apache/impala/analysis/CreateTableStmt.java#L276]

The following condition will be always true:
{noformat}
      if (getFileFormat() != THdfsFileFormat.TEXT
          || getFileFormat() != THdfsFileFormat.SEQUENCE_FILE)
{noformat}

 Instead of || we need to use &&.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to