rdblue commented on code in PR #6984: URL: https://github.com/apache/iceberg/pull/6984#discussion_r1125080662
########## 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: I don't think this is needed. We should avoid adding tests are are specific to Spark, but only test changes to core because those changes should apply to all engines. We want to catch problems as close to the source as possible. This is also a really expensive test because it spins up a catalog and Spark. I was able to get a test to fail by adding this to the end of the `TestSortOrder.testColumnDropWithSortOrder` test case that already drops a column referenced by an old sort order: ```java // ensure that the table metadata can be serialized and reloaded with an invalid order TableMetadataParser.fromJson(TableMetadataParser.toJson(table.ops().current())); ``` That just round-trip serializes the metadata. -- 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]
