The type of partition_spec in TableCreation is UnboundPartitionSpec, it's more dedicated to REST catalog, for non REST catalog seems more general to use PartitionSpec type. like
let p = PartitionSpecBuilder::new(&table_schema)
.add_partition_field("a", "bucket_a", Transform::Bucket(16))
.add_partition_field("b", "b", Transform::Identity)
.build()
TableCreation::builder()
.name(table_id.name.clone())
.schema(table_schema.clone())
.partition_spec(p).build()
The type of
partition_spec
inTableCreation
isUnboundPartitionSpec
, it's more dedicated to REST catalog, for non REST catalog seems more general to usePartitionSpec
type. like