Surya Hebbar has uploaded a new patch set (#6). ( http://gerrit.cloudera.org:8080/23996 )
Change subject: IMPALA-13464: Add STORED AS CSV and TSV syntactic sugar ...................................................................... IMPALA-13464: Add STORED AS CSV and TSV syntactic sugar This patch introduces `STORED AS CSV` and `STORED AS TSV` as syntactic sugar to simplify table creation. Previously, creating tables backed by CSV or TSV files required verbose statements to define the row format and storage type. Users can now write: CREATE TABLE my_csv_tbl(first_name string, age int) STORED AS CSV; Instead of the longer equivalent: CREATE TABLE my_csv_tbl(first_name string, age int) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; Both 'CSV' and 'TSV' have been added as valid `file_format_val` keywords. When used, the table defaults to a plain text file format with the following implicit row format configurations: - CSV: Field Delimiter = ',', Escaped By = '\' - TSV: Field Delimiter = '\t', Escaped By = '\' This mapping is handled using global variables declared in the parser's action code routines to manage the format state. Testing: - Unit and E2E tests are to be added Change-Id: Ia5ef21e7b2029314ac772b3465cac20a8a0d9a7b --- M fe/src/main/cup/sql-parser.cup M fe/src/main/jflex/sql-scanner.flex 2 files changed, 33 insertions(+), 4 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/96/23996/6 -- To view, visit http://gerrit.cloudera.org:8080/23996 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia5ef21e7b2029314ac772b3465cac20a8a0d9a7b Gerrit-Change-Number: 23996 Gerrit-PatchSet: 6 Gerrit-Owner: Surya Hebbar <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]>
