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

feat(storage): support nested type in read_parquet. #9486

Merged
merged 4 commits into from
Jan 8, 2023

Conversation

RinChanNOWWW
Copy link
Contributor

@RinChanNOWWW RinChanNOWWW commented Jan 6, 2023

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

  • Don't push down filter to parquet reading if the field is a nested type. (arrow2 doesn't support constructing index page reader on nested type).
  • Fix schema mismatch problem.
  • Fix panic problem when reading complex nested types (such as Array(Tuple)).

Try to fix #9417.

Note

  • Get fields on complex nested types can not succeed. Will be fixed in later PR.
> desc ttt;
+-------+-----------------------+------+---------+-------+
| Field | Type                  | Null | Default | Extra |
+-------+-----------------------+------+---------+-------+
| t     | ARRAY((INT32, INT32)) | NO   | []      |       |
+-------+-----------------------+------+---------+-------+
1 row in set (0.050 sec)

> select t[0]:a from ttt;
ERROR 1105 (HY000): Code: 1065, displayText = no overload satisfies `get((Int32, Int32) NULL, String)`

has tried possible overloads:
  get(Array(Nothing) NULL, UInt64 NULL) :: NULL     : unable to unify `(Int32, Int32)` with `Array(Nothing)`
  get(Array(T0 NULL), UInt64) :: T0 NULL            : unable to unify `(Int32, Int32) NULL` with `Array(T0 NULL)`
  get(Array(T0 NULL) NULL, UInt64 NULL) :: T0 NULL  : unable to unify `(Int32, Int32)` with `Array(T0 NULL)`
  get(Array(T0), UInt64) :: T0 NULL                 : unable to u

@vercel
Copy link

vercel bot commented Jan 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
databend ⬜️ Ignored (Inspect) Jan 8, 2023 at 3:03AM (UTC)

@mergify mergify bot added the pr-feature this PR introduces a new feature to the codebase label Jan 6, 2023
@RinChanNOWWW RinChanNOWWW marked this pull request as ready for review January 6, 2023 13:01
@mergify mergify bot merged commit bcedcae into datafuselabs:main Jan 8, 2023
@RinChanNOWWW RinChanNOWWW deleted the read-parquet-struct branch January 9, 2023 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Support reading snappy compressed parquet file
3 participants