Dandandan commented on code in PR #13228:
URL: https://github.com/apache/datafusion/pull/13228#discussion_r1827361232
##########
datafusion/core/src/datasource/file_format/csv.rs:
##########
@@ -454,7 +455,9 @@ impl CsvFormat {
.has_header
.unwrap_or(state.config_options().catalog.has_header),
)
- .with_delimiter(self.options.delimiter);
+ .with_delimiter(self.options.delimiter)
+ // Support literal NULL or empty string as null
+ .with_null_regex(Regex::new(r"^NULL$|^$").unwrap());
Review Comment:
Shouldn't this be a configuration option instead?
Most csv writers will use an empty string (`,,`) for null which also makes
sense as default.
Having the regex enabled might also impact performance?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]