[GitHub] [hudi] vinothchandar commented on a change in pull request #3844: [HUDI-1869] Upgrading Spark3 To 3.1

2021-10-28 Thread GitBox


vinothchandar commented on a change in pull request #3844:
URL: https://github.com/apache/hudi/pull/3844#discussion_r738403935



##
File path: 
hudi-spark-datasource/hudi-spark3/src/main/java/org/apache/hudi/spark3/internal/ReflectUtil.java
##
@@ -0,0 +1,46 @@
+/*
+ * 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.hudi.spark3.internal;
+
+import org.apache.spark.sql.catalyst.plans.logical.InsertIntoStatement;
+import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan;
+import scala.Option;
+import scala.collection.Seq;
+import scala.collection.immutable.Map;
+
+import java.lang.reflect.Constructor;
+
+public class ReflectUtil {
+
+  public static InsertIntoStatement createInsertInto(boolean isSpark30, 
LogicalPlan table, Map> partition, Seq 
userSpecifiedCols,

Review comment:
   thinking out loud. this uses reflection, but only seems to operate with 
a plan, so should be fine, performance overhead wise




-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [hudi] vinothchandar commented on a change in pull request #3844: [HUDI-1869] Upgrading Spark3 To 3.1

2021-10-28 Thread GitBox


vinothchandar commented on a change in pull request #3844:
URL: https://github.com/apache/hudi/pull/3844#discussion_r738400209



##
File path: hudi-spark-datasource/hudi-spark/pom.xml
##
@@ -490,6 +490,12 @@
   mockito-junit-jupiter
   test
 
+

Review comment:
   could we stick to log4j?




-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org