amogh-jahagirdar commented on code in PR #6559:
URL: https://github.com/apache/iceberg/pull/6559#discussion_r1066525147


##########
core/src/test/java/org/apache/iceberg/view/TestViewMetadataParser.java:
##########
@@ -0,0 +1,82 @@
+/*
+ * 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.view;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.iceberg.Schema;
+import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList;
+import org.apache.iceberg.types.Types;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+@RunWith(Parameterized.class)
+public class TestViewMetadataParser extends ParserTestBase<ViewMetadata> {
+  private static ViewVersion version1 =
+      BaseViewVersion.builder()
+          .versionId(1)
+          .timestampMillis(4353L)
+          .addRepresentation(
+              BaseSQLViewRepresentation.builder().query("select 'foo' 
foo").schemaId(1).build())
+          .build();
+
+  private static ViewHistoryEntry historyEntry1 = 
BaseViewHistoryEntry.of(4353L, 1);
+
+  private static final Schema TEST_SCHEMA =
+      new Schema(
+          1,
+          Types.NestedField.required(1, "x", Types.LongType.get()),
+          Types.NestedField.required(2, "y", Types.LongType.get(), "comment"),
+          Types.NestedField.required(3, "z", Types.LongType.get()));
+
+  private static ViewVersion version2 =
+      BaseViewVersion.builder()
+          .versionId(2)
+          .timestampMillis(5555L)

Review Comment:
   I'll add more tests for view metadata parsing. One thing I did just a bit 
differently than the original PR is move the JSON to a separate file in 
resources



-- 
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]

Reply via email to