vvysotskyi commented on a change in pull request #1826: DRILL-7272: Drill 
Metastore Read / Write API and Drill Iceberg Metastore implementation
URL: https://github.com/apache/drill/pull/1826#discussion_r304528563
 
 

 ##########
 File path: 
metastore/iceberg-metastore/src/main/java/org/apache/drill/metastore/iceberg/metadata/IcebergTableSchema.java
 ##########
 @@ -0,0 +1,160 @@
+/*
+ * 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.drill.metastore.iceberg.metadata;
+
+import org.apache.drill.metastore.MetastoreFieldDefinition;
+import org.apache.drill.metastore.iceberg.exceptions.IcebergMetastoreException;
+import org.apache.drill.shaded.guava.com.google.common.collect.ImmutableMap;
+import org.apache.iceberg.PartitionSpec;
+import org.apache.iceberg.Schema;
+import org.apache.iceberg.types.Types;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * Provides Iceberg table schema and its partition specification.
+ */
+public class IcebergTableSchema {
+
+  public static final String STORAGE_PLUGIN = "storagePlugin";
+  public static final String WORKSPACE = "workspace";
+  public static final String TABLE_NAME = "tableName";
+  public static final String METADATA_KEY = "metadataKey";
+
+  public static final int STARTING_SCHEMA_INDEX = 1;
+  public static final int STARTING_COMPLEX_TYPES_INDEX = 10_000;
+
+  private static final Map<String, org.apache.iceberg.types.Type> 
JAVA_TO_ICEBERG_TYPE_MAP =
+    ImmutableMap.<String, org.apache.iceberg.types.Type>builder()
+    .put("string", Types.StringType.get())
 
 Review comment:
   Could you please add indentation for methods calls.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to