apache / amoro

Apache Amoro (incubating) is a Lakehouse management system built on open data lake formats.
https://amoro.apache.org/
Apache License 2.0
836 stars 276 forks source link

[Improvement]: Supports float and double type fields as primary keys for Mixed-format tables #2342

Closed YesOrNo828 closed 1 week ago

YesOrNo828 commented 9 months ago

Search before asking

What would you like to be improved?

create catalog arctic with ( 'type'='arctic', 'metastore.url'='thrift://**:***/mixed_iceberg_simple' );

create table arctic.demo.floa (id float, primary key (id) not enforced); create table sour (id float) with ('connector'='datagen'); insert into arctic.demo.floa select * from sour;

Caused by: java.lang.IllegalArgumentException: Cannot add field id as an identifier field: must not be float or double field
at com.netease.arctic.shaded.org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
at com.netease.arctic.shaded.org.apache.iceberg.Schema.validateIdentifierField(Schema.java:130)
at com.netease.arctic.shaded.org.apache.iceberg.Schema.lambda$new$0(Schema.java:106)
at com.netease.arctic.shaded.org.apache.iceberg.Schema.<init>(Schema.java:106)
at com.netease.arctic.shaded.org.apache.iceberg.Schema.<init>(Schema.java:91)
at com.netease.arctic.shaded.org.apache.iceberg.flink.FlinkSchemaUtil.freshIdentifierFieldIds(FlinkSchemaUtil.java:86)
at com.netease.arctic.shaded.org.apache.iceberg.flink.FlinkSchemaUtil.convert(FlinkSchemaUtil.java:68)
at com.netease.arctic.flink.catalog.ArcticCatalog.createTable(ArcticCatalog.java:290)
at org.apache.flink.table.catalog.CatalogManager.lambda$createTable$10(CatalogManager.java:661)
at org.apache.flink.table.catalog.CatalogManager.execute(CatalogManager.java:841)

How should we improve?

Mixed-format table's primary keys can be defined as either float or double via Flink SQL.

Are you willing to submit PR?

Subtasks

No response

Code of Conduct

github-actions[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.

github-actions[bot] commented 1 week ago

This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'