wombatu-kun commented on code in PR #12772:
URL: https://github.com/apache/hudi/pull/12772#discussion_r2086349789


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/SparkJdbcUtils.scala:
##########
@@ -23,21 +23,23 @@ import 
org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils
 import org.apache.spark.sql.jdbc.JdbcDialect
 import org.apache.spark.sql.types.StructType
 
-import java.sql.ResultSet
+import java.sql.{Connection, ResultSet}
 
 /**
  * Util functions for JDBC source and tables in Spark.
  */
-object SparkJdbcUtils {
+object SparkJdbcUtils extends SparkAdapterSupport {
   /**
    * Takes a [[ResultSet]] and returns its Catalyst schema.
    *
+   * @param conn           [[Connection]] instance.
    * @param resultSet      [[ResultSet]] instance.
    * @param dialect        [[JdbcDialect]] instance.
    * @param alwaysNullable If true, all the columns are nullable.
    * @return A [[StructType]] giving the Catalyst schema.
    */
-  def getSchema(resultSet: ResultSet,
+  def getSchema(conn: Connection,

Review Comment:
   moved the logic to UtilHelpers and removed SparkJdbcUtils class



-- 
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]

Reply via email to