Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Bug
-
1.14.0
-
None
Description
Using latest stable version and latest SNAPSHOT version, when I export to a CSV file the result of a query, the text fields aren't enclosed with double quotes as specified.
Steps:
0: jdbc:drill:zk=local> USE dfs.tmp; +-------+--------------------------------------+ | ok | summary | +-------+--------------------------------------+ | true | Default schema changed to [dfs.tmp] | +-------+--------------------------------------+ 1 row selected (0.126 seconds) 0: jdbc:drill:zk=local> ALTER SESSION SET `store.format`='csv'; +-------+------------------------+ | ok | summary | +-------+------------------------+ | true | store.format updated. | +-------+------------------------+ 1 row selected (0.117 seconds) 0: jdbc:drill:zk=local> !set csvquotecharacter '"' 0: jdbc:drill:zk=local> CREATE TABLE dfs.tmp.prods_without_brand AS SELECT * FROM dfs.`/tmp/prods.csv` WHERE brand = ''; +-----------+----------------------------+ | Fragment | Number of records written | +-----------+----------------------------+ | 0_0 | 112 | +-----------+----------------------------+ 1 row selected (0.198 seconds) 0: jdbc:drill:zk=local>
The CSV output doesn't have any field enclosed with ", even those that have values with the , character, so the CSV is broken.