Skip to content

[Bug] Stream load bug for datetime with timezone in struct #36963

@joker-star-l

Description

@joker-star-l

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.1.3 and 2.1.4 and 2.1.7

What's Wrong?

When I use stream load with json format to load data with type STRUCT<timestamp:DATETIME(6)>, I got a null value.
Here are the details.

ddl

-- in database otel2
create table test (
    id INT,
    time STRUCT<timestamp:DATETIME(6)>
)
DISTRIBUTED BY HASH(id) BUCKETS AUTO
PROPERTIES (
"replication_num" = "1"
);

stream load

curl --location-trusted -u root: \
-H "Expect:100-continue" \
-H "format:json" \
-H "strip_outer_array:true" \
-H "timezone:Asia/Shanghai" \
-XPUT \
http://127.0.0.1:8030/api/otel2/test/_stream_load \
-d '[{"id":1,"time":{"timestamp":"2024-06-27 22:52:40.41845+08:00"}}]'

select the data, but get a null value

mysql> select * from test;
+------+---------------------+
| id   | time                |
+------+---------------------+
|    1 | {"timestamp": null} |
+------+---------------------+
1 row in set (0.01 sec)

What You Expected?

Correct time I load.

How to Reproduce?

Just use the command above.

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions