gfnogueira opened a new pull request, #185:
URL: https://github.com/apache/terraform-provider-iceberg/pull/185
Fixes #184
`type = "decimal(10, 2)"` fails on create with "Provider produced
inconsistent
result after apply", because the catalog value is read back as
"decimal(10,2)". For `element_type`, `key_type` and `value_type` the
opposite
spelling fails, since those are read back with the catalog's spacing.
This adds a custom string type for these four attributes with semantic
equality that ignores spaces, so whatever spelling is in the config is
kept in
state. Values read from the catalog are unchanged, so existing state and
the
table data source output stay the same. No state migration is needed.
This also unblocks imported tables: after `terraform import`, a config with
"decimal(10, 2)" failed on every apply. Now the first apply succeeds and
the
next plan is empty.
Changing only the spacing in an existing config still shows an in-place
update, but it sends no schema change to the catalog.
Tests: new acceptance test TestAccIcebergTableTypeWhitespace (fails on
main),
covering regular, list, map and struct fields, plus a unit test for the
equality check. `make test-integration`, golangci-lint and staticcheck pass
locally.
--
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]