You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/05/02 22:08:44 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #2512: Spark: Support building against both Spark 3.0 and Spark 3.1.

rdblue commented on a change in pull request #2512:
URL: https://github.com/apache/iceberg/pull/2512#discussion_r624787512



##########
File path: spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/parser/extensions/IcebergSparkSqlExtensionsParser.scala
##########
@@ -41,7 +43,17 @@ import org.apache.spark.sql.types.StructType
 
 class IcebergSparkSqlExtensionsParser(delegate: ParserInterface) extends ParserInterface {
 
-  private lazy val substitutor = new VariableSubstitution(SQLConf.get)
+  private lazy val substitutorCtor: DynConstructors.Ctor[VariableSubstitution] =
+    DynConstructors.builder()
+      .impl(classOf[VariableSubstitution])
+      .impl(classOf[VariableSubstitution], classOf[SQLConf])
+      .build()
+  private lazy val substitutor =

Review comment:
       The constructor should automatically drop extra arguments, so you should only need `substitutorCtor.newInstance(SQLConf.get)`




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org