Skip to content

[Bug]: load jsonline with a nested json type doesn't work #7243

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.0
- Hardware parameters:
- OS type: 
- Others: docker

Actual Behavior

A jsonline file with such structure:

{"id":1,"father":"Mark","mother":"Charlotte","children":{"son":"Tom"}}
{"id":2,"father":"John","mother":"Ann","children":{"daughter":"Jessika","son":"Jack"}}
{"id":3,"father":"Bob","mother":"Monika","children":{"son":["Jerry","Karol"]}}
mysql>  CREATE TABLE `t4` (
`id` INT DEFAULT NULL,
`father` VARCHAR(100) DEFAULT NULL,
`mother` VARCHAR(100) DEFAULT NULL,
`children` JSON DEFAULT NULL
)
mysql> load data infile {'filepath'='/ssb-dbgen-path/jsonline_object3.jl','format'='jsonline','jsondata'='object'} into table t4; 
ERROR 20101 (HY000): internal error: the input value 'map[son:Tom]' is not json type for column 3

Expected Behavior

No response

Steps to Reproduce

No response

Additional information

No response

Activity

  1. added
    kind/bug
    severity/s0
    on Dec 16, 2022
  2. added this to the v0.7.0 milestone on Dec 16, 2022
  3. mooleetzi commented on Dec 16, 2022

    @mooleetzi
    Contributor

    fix next week

  4. mooleetzi commented on Dec 27, 2022

    @mooleetzi
    Contributor

    fixed, pls test

  5. dengn commented on Jan 3, 2023

    @dengn
    ContributorAuthor

    fixed

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

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions