Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: load parquet data to databend failed if had timestamp columns #6627

Closed
1 of 2 tasks
FANNG1 opened this issue Jul 14, 2022 · 3 comments · Fixed by #6668
Closed
1 of 2 tasks

bug: load parquet data to databend failed if had timestamp columns #6627

FANNG1 opened this issue Jul 14, 2022 · 3 comments · Fixed by #6668
Assignees
Labels
C-bug Category: something isn't working

Comments

@FANNG1
Copy link

FANNG1 commented Jul 14, 2022

Search before asking

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

Version

80e09b3

What's Wrong?

could't load parquet data to databend

How to Reproduce?

  1. create table with sql "create table mytime(id string, t_bool boolean, t_float float, t_double double, t_timestamp timestamp, t_data date, t_array array(int));"
  2. load parquet data, curl -XPUT 'http://root:@127.0.0.1:8081/v1/streaming_load' -H 'insert_sql: insert into mytime format Parquet' -F 'upload=@"./mytime.parquet"'

parquet data: https://github.com/sandflee/databend/blob/parquet/mytime.parquet

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@FANNG1 FANNG1 added the C-bug Category: something isn't working label Jul 14, 2022
@FANNG1
Copy link
Author

FANNG1 commented Jul 14, 2022

databend transfrom timestamp to int64 arrow type, while the phiscal type of "t_timestamp" in parquet is int96, this may cause the error, any advise?

@sundy-li
Copy link
Member

Oh, databend's timestamp is always int64. But parquet may have int96 timestamp.
There is a method to handle this, maybe we should map timestamp to arrow2's timestamp datatype.
Let me find a way to fix this.

@sundy-li sundy-li self-assigned this Jul 14, 2022
@FANNG1
Copy link
Author

FANNG1 commented Jul 15, 2022

using arrow::timestamp seems reasonable, could compatible parquet int64 and int96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants