Denys Ordynskiy created DRILL-7336: -------------------------------------- Summary: `cast_empty_string_to_null` option doesn't work when text file has > 1 column Key: DRILL-7336 URL: https://issues.apache.org/jira/browse/DRILL-7336 Project: Apache Drill Issue Type: Bug Reporter: Denys Ordynskiy
*Description:* 1 - create 2 nullable csv files with 1 and 2 columns: _one_col.csv_ {noformat} 1 2 4 {noformat} _two_col.csv_ {noformat} 1,1 2, ,3 4,4 {noformat} 2 - enable option: {noformat} alter system set `drill.exec.functions.cast_empty_string_to_null`=true; {noformat} 3 - query file with 1 column: {noformat} select columns[0] from dfs.tmp.`one_col.csv`; {noformat} | EXPR$0 | | 1 | | 2 | | null | | 4 | 4 - query file with 2 columns: {noformat} select columns[0] from dfs.tmp.`two_col.csv`; {noformat} *Expected result:* Table with NULL in the 3-rd row: | EXPR$0 | | 1 | | 2 | | null | | 4 | *Actual result:* {color:#d04437}Drill returns an empty string in the 3-rd row:{color} | EXPR$0 | | 1 | | 2 | | | | 4 | -- This message was sent by Atlassian JIRA (v7.6.14#76016)