vinishjail97 commented on code in PR #639:
URL: https://github.com/apache/incubator-xtable/pull/639#discussion_r1949803320


##########
xtable-core/pom.xml:
##########
@@ -82,6 +82,12 @@
             <groupId>org.apache.hudi</groupId>
             <artifactId>hudi-java-client</artifactId>
         </dependency>
+        <dependency>

Review Comment:
   Shouldn't this go here ? 
   https://github.com/apache/incubator-xtable/tree/main/xtable-hive-metastore 



##########
xtable-api/src/main/java/org/apache/xtable/conversion/ExternalTable.java:
##########
@@ -44,7 +45,7 @@ class ExternalTable {
   protected final CatalogConfig catalogConfig;
 
   /** Optional, additional properties that can be used to define interactions 
with the table */
-  protected final Properties additionalProperties;

Review Comment:
   Why are we removing final ? Let's keep it immutable otherwise will be 
difficult to debug as this object is passed around multiple classes and 
function calls. If you want to change something you need to clone the object 
and change few properties.



##########
xtable-hive-metastore/src/main/java/org/apache/xtable/hms/HMSCatalogConfig.java:
##########
@@ -43,6 +45,15 @@ public class HMSCatalogConfig {
   @JsonProperty("externalCatalog.hms.serverUrl")
   private final String serverUrl;
 
+  @JsonProperty("externalCatalog.hms.schema_string_length_thresh")
+  private final int schemaLengthThreshold = 4000;
+
+  @JsonProperty("externalCatalog.hms.partition_extractor_class")
+  private final String partitionExtractorClass = 
MultiPartKeysValueExtractor.class.getName();
+
+  @JsonProperty("externalCatalog.hms.max_partitions_per_request")
+  private final int maxPartitionsPerRequest = 1000;
+

Review Comment:
   This can be moved to a `HMSPartitionSyncConfig` ? It would be populated by 
formats which sync partitions to the catalog. 



##########
xtable-core/src/main/java/org/apache/xtable/hudi/HudiInputFormatUtils.java:
##########
@@ -0,0 +1,72 @@
+/*
+ * 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.xtable.hudi;
+
+import org.apache.hudi.common.model.HoodieFileFormat;
+
+import org.apache.xtable.exception.NotSupportedException;
+
+public class HudiInputFormatUtils {
+
+  public static String getInputFormatClassName(HoodieFileFormat 
baseFileFormat, boolean realtime) {
+    switch (baseFileFormat) {
+      case PARQUET:
+        if (realtime) {
+          return 
"org.apache.hudi.hadoop.realtime.HoodieParquetRealtimeInputFormat";
+        } else {
+          return "org.apache.hudi.hadoop.HoodieParquetInputFormat";
+        }

Review Comment:
   Let's make this strings as static final constants and a comment about their 
context ? 



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

Reply via email to