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

Do not make storage_descriptor require all arguments for TableBuilder #67

Open
sananguliyev opened this issue Nov 1, 2021 · 0 comments

Comments

@sananguliyev
Copy link

sananguliyev commented Nov 1, 2021

storage_descriptor should not require all arguments for table builder because of virtual view. e.g.

table = TableBuilder(
    table_name="test_view",
    db_name="default",
    owner="test",
    table_type="VIRTUAL_VIEW",
    storage_descriptor=storage_descriptor,
    view_expanded_text="select * from test",
    view_original_text="select * from test"
).build()

When the user wants to create a virtual view, he/she should be able to just pass columns to storage descriptor instead of everything.

Instead of

storage_descriptor = StorageDescriptorBuilder(
    columns=columns,
    location="s3a://path/to/file",
    input_format="org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat",
    output_format="org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat",
    serde_info=serde_info,
).build()

user should pass just

storage_descriptor = StorageDescriptorBuilder(
    columns=columns,
).build()
@sananguliyev sananguliyev changed the title Do not make storage_descriptor required argument go TableBuilder Do not make storage_descriptor required argument for TableBuilder Nov 1, 2021
@sananguliyev sananguliyev reopened this Nov 1, 2021
@sananguliyev sananguliyev changed the title Do not make storage_descriptor required argument for TableBuilder Do not make storage_descriptor require all arguments for TableBuilder Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant