delta-io / delta

An open-source storage framework that enables building a Lakehouse architecture with compute engines including Spark, PrestoDB, Flink, Trino, and Hive and APIs
https://delta.io
Apache License 2.0
7.62k stars 1.71k forks source link

Make CTAS with replace honor column mapping when writing first set of parquet files #3696

Closed lzlfred closed 2 months ago

lzlfred commented 2 months ago

Which Delta project/connector is this regarding?

Description

Make CTAS with replace honor column mapping when writing first set of parquet files; Otherwise the uniform table will end up with parquet files without column mapping and thus have null in query results.

How was this patch tested?

manual test with CTAS.

Does this PR introduce any user-facing changes?