leesf commented on code in PR #5943:
URL: https://github.com/apache/hudi/pull/5943#discussion_r928353409
##########
hudi-spark-datasource/hudi-spark3-common/src/main/scala/org/apache/spark/sql/adapter/BaseSpark3Adapter.scala:
##########
@@ -81,23 +80,12 @@ abstract class BaseSpark3Adapter extends SparkAdapter with
Logging {
}
}
- override def createExtendedSparkParser: Option[(SparkSession,
ParserInterface) => ParserInterface] = {
- // since spark3.2.1 support datasourceV2, so we need to a new SqlParser to
deal DDL statment
- if (SPARK_VERSION.startsWith("3.1")) {
- val loadClassName =
"org.apache.spark.sql.parser.HoodieSpark312ExtendedSqlParser"
- Some {
- (spark: SparkSession, delegate: ParserInterface) => {
- val clazz = Class.forName(loadClassName, true,
Thread.currentThread().getContextClassLoader)
- val ctor = clazz.getConstructors.head
- ctor.newInstance(spark, delegate).asInstanceOf[ParserInterface]
- }
- }
- } else {
- None
- }
- }
-
override def createInterpretedPredicate(e: Expression): InterpretedPredicate
= {
Predicate.createInterpreted(e)
}
+
+ override def getQueryParserFromExtendedSqlParser(session: SparkSession,
delegate: ParserInterface,
Review Comment:
can this method defined in `SparkAdapter` and default implement is
unsupported ?
--
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]