Skip to content

[Bug]: load data inline format jsonline is not working correctly #12020

Closed

Description

@fengttt

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): main 1c22af44b
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

-- bug: this will load data as csv, should be unsupported/unknown format
mysql> load data inline format='foo', data='1,2\n' into table t;
Query OK, 1 row affected (0.01 sec)

-- bug: this will also load data as csv, not json
mysql> load data inline format='json', data='1,2\n' into table t;
Query OK, 1 row affected (0.01 sec)

-- jsonline is not implemented, we want this ...
mysql> load data inline format='jsonline', data='1,2\n' into table t;
ERROR 20105 (HY000): not supported: the jsonline format '' is not supported now
mysql>

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

Activity

  1. added
    kind/bug
    severity/s1
    on Oct 8, 2023
  2. added this to the 1.0.0 milestone on Oct 8, 2023
  3. modified the milestones: 1.0.0, 1.1.0 on Oct 17, 2023
  4. Morranto commented on Nov 27, 2023

    @Morranto
    Contributor

    load data inline example:

    --jsontype field is needed if inline format is 'jsonline', and it only supports 'object' and 'array' now
    
    load data inline format='jsonline', data='[1,2]', jsontype = 'array' into table t;
    
    create table t5(col1 text);
    load data inline format='jsonline', data='{"col1":"good"}' , jsontype = 'object'  into table t5;

    .

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

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s1team/c2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions