nastra commented on issue #10084:
URL: https://github.com/apache/iceberg/issues/10084#issuecomment-2036212500
> ```
> spark.sql("CREATE TABLE rest.test.table1(id bigint, data
string)").show(false)
> ```
>
> And you can see the request body sent to the createTable endpoint will
look like this
>
> ```json
> {
> "name": "table1",
> "location": null,
> "schema": {
> "type": "struct",
> "schema-id": 0,
> "fields": [
> {
> "id": 0,
> "name": "id",
> "required": false,
> "type": "long"
> },
> {
> "id": 1,
> "name": "data",
> "required": false,
> "type": "string"
> }
> ]
> },
> "partition-spec": {
> "spec-id": 0,
> "fields": []
> },
> "write-order": null,
> "properties": {
> "owner": "your.name"
> },
> "stage-create": false
> }
> ```
As you mentioned, this is what's being sent over the wire via a
`CreateTableRequest`. What you need to compare is the metadata that was
produced once the table was created. Both should produce the exact same thing,
because field IDs are being re-assigned in
https://github.com/apache/iceberg/blob/5e139f48505b9b622e2cf389eae2bb74d6420510/core/src/main/java/org/apache/iceberg/TableMetadata.java#L119-L120
for consistency (which is basically what @RussellSpitzer said earlier).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]