dttung2905 commented on code in PR #41: URL: https://github.com/apache/terraform-provider-iceberg/pull/41#discussion_r3375844402
########## internal/provider/table_metadata_sync.go: ########## @@ -0,0 +1,86 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package provider + +import ( + "context" + + "github.com/apache/iceberg-go/table" + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +// icebergTableMetadataFields holds Terraform values synced from an Iceberg table's metadata +// (schema, partition spec, sort order, properties). Used by the table resource and table data source. +type icebergTableMetadataFields struct { + Schema types.Object + PartitionSpec types.Object + SortOrder types.Object + ServerProperties types.Map +} + +func syncIcebergTableMetadataToModel(ctx context.Context, tbl *table.Table, out *icebergTableMetadataFields, diags *diag.Diagnostics) { Review Comment: I have changed the func name and also renamed the file too. Could you help to review it again? -- 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]
