Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Impala 4.1.0, Impala 4.2.0, Impala 4.1.1
-
None
-
ghx-label-4
Description
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.
[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
The following code is buggy:
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."); } } }
Attachments
Issue Links
- is caused by
-
IMPALA-9822 Impala does not notify user that row format delimited fields is only logical when using STORED AS TEXTFILE
- Resolved
- links to