Skip to content

CSV can't parse null value for non-string type (i32, i64, float) #12904

Description

@jayzhan211

Describe the bug

As title, I would like to store null value in the csv table but couldn't.

To Reproduce

Write a csv file to datafusion/core/tests/data/data.csv with

c1,c2
NULL,'a'
statement ok
CREATE EXTERNAL TABLE t (
c1 INT,
c2 VARCHAR,
)
STORED AS CSV
LOCATION '../core/tests/data/data.csv'
OPTIONS ('format.has_header' 'true');

query error DataFusion error: Arrow error: Parser error: Error while parsing value NULL for column 0 at line 1
select * from t;

Expected behavior

Successfully store nulls for non-string type

Additional context

String is fine

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions