gfnogueira opened a new issue, #184:
URL: https://github.com/apache/terraform-provider-iceberg/issues/184
Creating a table fails with "Provider produced inconsistent result after
apply"
depending on how the decimal type is spaced, and the accepted spacing is
different for regular fields and for list/map types.
Repro (main at 2a7f865, apache/iceberg-rest-fixture:1.10.1):
```hcl
schema = {
fields = [
{ name = "amount", type = "decimal(10, 2)", required = false },
]
}
```
```
Error: Provider produced inconsistent result after apply
.schema.fields[0].type: was cty.StringVal("decimal(10, 2)"), but now
cty.StringVal("decimal(10,2)").
```
For list_properties.element_type and map_properties.key_type/value_type it is
the other way around: "decimal(10, 2)" works and "decimal(10,2)", the form
the
docs show for `type`, fails.
Cause: unmarshalFieldJSON strips spaces from the type returned by the catalog
for fields, but not for list element or map key/value types, and nothing
makes
the planned value and the returned value compare equal.
I have a fix with tests and can open a PR.
--
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]