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

Allow users to define the data type and nullability of a partition column when converting a Parquet table to Delta table #1718

Closed
junjunjd opened this issue Oct 13, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@junjunjd
Copy link
Contributor

junjunjd commented Oct 13, 2023

Description

In the PySpark APIs for convertToDelta command, users can specify the data type of a partition column:

# Convert partitioned parquet table at path 'path/to/table' and partitioned by integer column named 'part'
partitionedDeltaTable = DeltaTable.convertToDelta(spark, "parquet.`path/to/table`", "part int")

It makes sense to support user-defined data type and nullability for partition columns in convert_to_delta. Currently the convert_to_delta function sets the data type of all partition columns as string.

Use Case

Related Issue(s)
#1041, #1682, #1686

@junjunjd junjunjd added the enhancement New feature or request label Oct 13, 2023
@junjunjd
Copy link
Contributor Author

The convert_to_delta API now takes a vector of SchemaField for partition columns defined by user.

pub async fn convert_to_delta(
    storage: ObjectStoreRef,
    partition_schema: Vec<SchemaField>,
) -> Result<DeltaTable, Error> 

The changes are pushed to #1686.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant