rdblue commented on code in PR #6984: URL: https://github.com/apache/iceberg/pull/6984#discussion_r1125088688
########## spark/v3.3/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestAlterSortOrder.java: ########## @@ -0,0 +1,70 @@ +/* + * 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 org.apache.iceberg.spark.extensions; + +import java.util.Map; +import org.apache.iceberg.Table; +import org.junit.After; +import org.junit.Assert; +import org.junit.Test; + +public class TestAlterSortOrder extends SparkExtensionsTestBase { Review Comment: Actually, here's a quick diff: ```diff diff --git a/core/src/test/java/org/apache/iceberg/TestSortOrder.java b/core/src/test/java/org/apache/iceberg/TestSortOrder.java index 45ff0bd71f..6b5100ed66 100644 --- a/core/src/test/java/org/apache/iceberg/TestSortOrder.java +++ b/core/src/test/java/org/apache/iceberg/TestSortOrder.java @@ -320,6 +320,9 @@ public class TestSortOrder { "Order ID must match", TableMetadata.INITIAL_SORT_ORDER_ID + 1, actualOrder.orderId()); Assert.assertEquals( "Schema must have one less column", initialColSize - 1, table.schema().columns().size()); + + // ensure that the table metadata can be serialized and reloaded with an invalid order + TableMetadataParser.fromJson(TableMetadataParser.toJson(table.ops().current())); } @Test ``` -- 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]
