Github user huaxingao commented on a diff in the pull request:
https://github.com/apache/spark/pull/19256#discussion_r139313120
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/jdbc/AggregatedDialect.scala ---
@@ -41,4 +41,8 @@ private class AggregatedDialect(dialects:
List[JdbcDialect]) extends JdbcDialect
override def getJDBCType(dt: DataType): Option[JdbcType] = {
dialects.flatMap(_.getJDBCType(dt)).headOption
}
+
+ override def isCascadingTruncateTable(): Option[Boolean] = {
+ dialects.flatMap(_.isCascadingTruncateTable).headOption
--- End diff --
Both getCatalystType and getJDBCType(dt: DataType) use the first one. Also,
in the class header, it has the following:
/**
* AggregatedDialect can unify multiple dialects into one virtual Dialect.
* Dialects are tried in order, and the first dialect that does not return a
* neutral element will will.
*
* @param dialects List of dialects.
*/
It has a typo, I guess it means "the first dialect that does not return a
neutral element will return"
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]