Vladimir, what is the context in which you want to maintain a partition spec with only void transforms? Is this in a v2 table? In a v2 table, the catalog should be free to remove void transforms. They are required for v1.
On Wed, Oct 30, 2024 at 5:00 AM Vladimir Ozerov <voze...@querifylabs.com> wrote: > Hi, > > When a user creates a table with void() transform on a single column, REST > catalogs appears to ignore this, and ends up with a table with no > partitioning information. The relevant code part is in > RESTSessionCatalog.createChanges: > > PartitionSpec spec = meta.spec(); > if (spec != null && spec.isPartitioned()) { > changes.add(new MetadataUpdate.AddPartitionSpec(spec)); > } else { > changes.add(new > MetadataUpdate.AddPartitionSpec(PartitionSpec.unpartitioned())); > } > > My question is whether this is by design or not? From the user > perspective, this appears to be ok, because the table is not partitioned > anyway. However, some engines, such as Trino, currently retain void() > partitioning info for non-REST catalogs. What would be the proper > expectation from the Iceberg user in this case - should it observe void() > in table schema or not? > > Regards, > -- > *Vladimir Ozerov* > Founder > querifylabs.com >