You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Fokko (via GitHub)" <gi...@apache.org> on 2025/07/30 19:59:35 UTC
[I] REST: Unable to create a partitioned Table [iceberg-rust]
Fokko opened a new issue, #1567:
URL: https://github.com/apache/iceberg-rust/issues/1567
### Apache Iceberg Rust version
0.5.1 (latest version)
### Describe the bug
When creating a partitioned table:
```rust
let schema = Schema::builder()
.with_schema_id(1)
.with_fields(vec![
NestedField::optional(1, "ts", Type::Primitive(PrimitiveType::Timestamp)).into(),
])
.build()
.unwrap();
let partition_spec = UnboundPartitionSpec::builder()
.add_partition_field(1, "day", Transform::Day)
.unwrap()
.with_spec_id(0)
.build();
let table_creation = TableCreation::builder()
.name("test_append_date_partition_data_file".to_string())
.schema(schema.clone())
.partition_spec_opt(Some(partition_spec))
.build();
let table = rest_catalog
.create_table(ns.name(), table_creation)
.await
.unwrap();
```
I get the following error from the [`iceberg-rest-fixture` docker container](https://github.com/apache/iceberg/blob/main/docker/iceberg-rest-fixture/README.md):
```
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 com.fasterxml.jackson.databind.JsonMappingException: Cannot parse to an integer value: field-id: null (through reference chain: org.apache.iceberg.rest.requests.CreateTableRequest["partition-spec"])</title>
</head>
<body><h2>HTTP ERROR 500 com.fasterxml.jackson.databind.JsonMappingException: Cannot parse to an integer value: field-id: null (through reference chain: org.apache.iceberg.rest.requests.CreateTableRequest["partition-spec"])</h2>
<table>
<tr><th>URI:</th><td>/v1/namespaces/591d3547-d420-426d-8f5a-6d9966b90a44/tables</td></tr>
<tr><th>STATUS:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>com.fasterxml.jackson.databind.JsonMappingException: Cannot parse to an integer value: field-id: null (through reference chain: org.apache.iceberg.rest.requests.CreateTableRequest["partition-spec"])</td></tr>
<tr><th>SERVLET:</th><td>org.apache.iceberg.rest.RESTCatalogServlet-5c30a9b0</td></tr>
```
I noticed that by default the field-IDs are `None`:
https://github.com/apache/iceberg-rust/blob/195fb739da1a01e028a537e8a8b9e4e07ee144fa/crates/iceberg/src/spec/partition.rs#L296-L310
Should we assign them from `1000` and then increment?
I think the current API is confusing and will require users to assign field-IDs which is not super friendly. Thoughts @Xuanwo @liurenjie1024 @c-thiel ?
### To Reproduce
_No response_
### Expected behavior
_No response_
### Willingness to contribute
None
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] REST: Unable to create a partitioned Table [iceberg-rust]
Posted by "ZENOTME (via GitHub)" <gi...@apache.org>.
ZENOTME commented on issue #1567:
URL: https://github.com/apache/iceberg-rust/issues/1567#issuecomment-3140221915
Current design will delay the field id assign until building partition spec from unbound partition spec: https://github.com/apache/iceberg-rust/blob/cfe2a980b27cda744fab8e78b4550b167b4d4d45/crates/iceberg/src/spec/partition.rs#L455
Maybe we should let TableCreation store a partition spec or custom its build method to bind partition spec with schema.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] REST: Unable to create a partitioned Table [iceberg-rust]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #1567: REST: Unable to create a partitioned Table
URL: https://github.com/apache/iceberg-rust/issues/1567
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] REST: Unable to create a partitioned Table [iceberg-rust]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1567:
URL: https://github.com/apache/iceberg-rust/issues/1567#issuecomment-3814629066
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] REST: Unable to create a partitioned Table [iceberg-rust]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1567:
URL: https://github.com/apache/iceberg-rust/issues/1567#issuecomment-3887955577
This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] REST: Unable to create a partitioned Table [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on issue #1567:
URL: https://github.com/apache/iceberg-rust/issues/1567#issuecomment-3144028045
> Should we assign them from 1000 and then increment?
Sounds reasonable to me. Users are free to assign paritition id for `UnboundPartitionSpec` but they will still be reassigned when creating table.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org