Replies: 2 comments
-
I also would have expected this to produce null There appears to be a setting in the underlying arrow reader to set this: https://docs.rs/arrow-csv/47.0.0/arrow_csv/reader/struct.ReaderBuilder.html#method.with_null_regex But I don't understand why the value is not treated as NULL. Maybe we should file a bug 🤔 BTW here is a reproducer with datafusion-cli $ cat /tmp/test.csv
id,name
1,
2,bob $ datafusion-cli
DataFusion CLI v31.0.0
❯ select id, name, name IS NULL from '/tmp/test.csv';
+----+------+----------------------------+
| id | name | /tmp/test.csv.name IS NULL |
+----+------+----------------------------+
| 1 | | false |
| 2 | bob | false |
+----+------+----------------------------+
2 rows in set. Query took 0.006 seconds. |
Beta Was this translation helpful? Give feedback.
-
Thank you @alamb I did some digging and it looks like that method was added in I then tried the main branch of I'll raise a bug for this :) |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have a basic CSV file like this:
And I'm running this code where I'm attempting to filter out null names:
I was expecting the name value in row 1 to be treated as null (as it's an empty string), but the output from the code shows the opposite:
So I was wondering if this is expected behaviour/there's a setting that needs to be toggled for empty strings to be treated as null?
Beta Was this translation helpful? Give feedback.
All reactions