vinothchandar commented on a change in pull request #3693:
URL: https://github.com/apache/hudi/pull/3693#discussion_r714754453
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/KeyGenUtils.java
##########
@@ -40,7 +40,7 @@
protected static final String NULL_RECORDKEY_PLACEHOLDER = "__null__";
protected static final String EMPTY_RECORDKEY_PLACEHOLDER = "__empty__";
- protected static final String DEFAULT_PARTITION_PATH = "default";
+ protected static final String DEFAULT_PARTITION_PATH =
PartitionPathEncodeUtils.HUDI_DEFAULT_PARTITION_PATH;
Review comment:
rename: `HOODIE_DEFAULT_PARTITION_PATH`
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/util/PartitionPathEncodeUtils.java
##########
@@ -25,6 +25,8 @@
*/
public class PartitionPathEncodeUtils {
+ public static final String HUDI_DEFAULT_PARTITION_PATH = "default";
Review comment:
actually lets just do `DEFAULT_PARTITION_PATH`
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/util/PartitionPathEncodeUtils.java
##########
@@ -71,7 +73,7 @@ public static String escapePathName(String path, String
defaultPath) {
if (defaultPath == null) {
//previously, when path is empty or null and no default path is
specified,
// __HIVE_DEFAULT_PARTITION__ was the return value for escapePathName
- return "__HIVE_DEFAULT_PARTITION__";
+ return HUDI_DEFAULT_PARTITION_PATH;
Review comment:
why is this change needed
##########
File path:
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/HoodieCommand.scala
##########
@@ -0,0 +1,47 @@
+/*
+ * 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.spark.sql.hudi.command
+
+import java.util.Properties
+
+import org.apache.hudi.client.common.HoodieSparkEngineContext
+import org.apache.hudi.common.config.HoodieMetadataConfig
+import org.apache.hudi.common.fs.FSUtils
+import org.apache.spark.api.java.JavaSparkContext
+import org.apache.spark.sql.SparkSession
+import org.apache.spark.sql.catalyst.catalog.CatalogTable
+import org.apache.spark.sql.hudi.HoodieSqlUtils
+
+import scala.collection.JavaConverters._
+
+/**
+ * Helper trait for all hoodie commands.
+ */
+trait HoodieCommand {
Review comment:
in the interest of keeping class hierarchies tenable, can this become a
helper method?
--
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]