Skip to content

[Bug]: load jsonline doesn't support null #7295

Closed

Description

@dengn

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): 0.6
- Hardware parameters:
- OS type:
- Others: docker

Actual Behavior

mysql> load data infile {'filepath'='/ssb-dbgen-path/example_array3.jsonl','format'='jsonline','jsondata'='array'} into table t2 ignore 1 lines;
ERROR 20101 (HY000): internal error: the input value '' is not bool type for column 3

create table t2 (name varchar(100), session varchar(100), score int, completed bool);

example_array3.jsonl:
["Name", "Session", "Score", "Completed"]
["Gilbert", "2013", 24, true]
["Alexa", "2013", 29, false]
["May", "2012B", 14, null]
["Deloise", "2012A", 19, true]

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

Activity

  1. added
    kind/bug
    severity/s1
    on Dec 22, 2022
  2. added this to the v0.7.0 milestone on Dec 22, 2022
  3. added a commit that references this issue on Dec 22, 2022
    2a1ef62
  4. mooleetzi commented on Dec 22, 2022

    @mooleetzi
    Contributor

    fixed by #7254

  5. mooleetzi commented on Dec 27, 2022

    @mooleetzi
    Contributor

    fixed, pls test

  6. dengn commented on Jan 7, 2023

    @dengn
    ContributorAuthor

    will test

  7. dengn commented on Jan 9, 2023

    @dengn
    ContributorAuthor

    fixed.

    mysql> create table t2(a varchar(20), b varchar(20), c int, d bool);
    Query OK, 0 rows affected (0.02 sec)
    
    mysql> load data infile {'filepath'='/root/mo20221229/a.jsonl','format'='jsonline','jsondata'='array'} into table t2 ignore 1 lines;
    Query OK, 4 rows affected (0.01 sec)
    
    mysql> select * from t2;
    +---------+-------+------+-------+
    | a       | b     | c    | d     |
    +---------+-------+------+-------+
    | Gilbert | 2013  |   24 | true  |
    | Alexa   | 2013  |   29 | false |
    | May     | 2012B |   14 | NULL  |
    | Deloise | 2012A |   19 | true  |
    +---------+-------+------+-------+
    4 rows in set (0.00 sec)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s1

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions