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

[Spark] Refactor CONVERT TO DELTA blocking conversion logic #3676

Closed zhipengmao-db closed 2 months ago

zhipengmao-db commented 2 months ago

Which Delta project/connector is this regarding?

Description

The PR extracts the logic to block conversion to Delta table into a separate method checkConversionIsAllowed in ConvertToDeltaCommand in order not to bloat the main performConvert method when more blocking conditions are added.

How was this patch tested?

Just refactoring. Existent tests should cover the change.

Does this PR introduce any user-facing changes?

No.