paimon icon indicating copy to clipboard operation
paimon copied to clipboard

[Feature] Paimon Support Spark Field Metadata

Open davidyuan1223 opened this issue 11 months ago • 0 comments

Search before asking

  • [x] I searched in the issues and found nothing similar.

Motivation

After Spark3.3+, which support field with meatdata, currently paimon schema don't support the field metadata, So we need to support this. And, after Spark3.4, Spark SQL Support FIELD DEFAULT VALUE, which is add field default value into field metadata. So If we wanna support SPARK DEFAULT VALUE, we need support metadata first.

Solution

  1. When Create Spark Table, add the metadata configs into schema options field.
  2. When Load Spark Table, add the metadata configs from options into StructType
  3. Whe Alter Spark Table, should support AddColumn(contains defaultValue), UpdateColumnDefaultValue, DeleteColumn(delete metadata in options)

Anything else?

No response

Are you willing to submit a PR?

  • [x] I'm willing to submit a PR!

davidyuan1223 avatar Feb 05 '25 09:02 davidyuan1223