forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add schema to parquet writer options (facebookincubator#6074)
Summary: Here is the schema information for the TPCH `supplier `table. ``` root |-- s_suppkey: long (nullable = true) |-- s_name: string (nullable = true) |-- s_address: string (nullable = true) |-- s_nationkey: long (nullable = true) |-- s_phone: string (nullable = true) |-- s_acctbal: double (nullable = true) |-- s_comment: string (nullable = true) ``` When we write the `supplier `table into a parquet file using velox parquet writer in Gluten, we encounter the incorrect schema issue. ``` root |-- n0_0: long (nullable = true) |-- n0_1: string (nullable = true) |-- n0_2: string (nullable = true) |-- n0_3: long (nullable = true) |-- n0_4: string (nullable = true) |-- n0_5: double (nullable = true) |-- n0_6: string (nullable = true) ``` The reason for this is that the schema is inferred from the record batch. To address this, this PR introduces a schema into the `WriterOption`. This allows us to pass the appropriate schema to the Parquet writer. Pull Request resolved: facebookincubator#6074 Reviewed By: xiaoxmeng Differential Revision: D52153693 Pulled By: mbasmanova fbshipit-source-id: d4bb340ebe5b1ad0f6460ccc1b14b5d8e21ab885
- Loading branch information
1 parent
050c16c
commit 2ada2ec
Showing
6 changed files
with
190 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.