You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/03/09 03:51:09 UTC

[GitHub] [incubator-seatunnel] BenJFan commented on a change in pull request #1410: [Bug] [spark-connector-jdbc] there are a NPE when sink in update mode…

BenJFan commented on a change in pull request #1410:
URL: https://github.com/apache/incubator-seatunnel/pull/1410#discussion_r821688090



##########
File path: seatunnel-connectors/seatunnel-connector-spark-jdbc/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc2/DefaultSource.scala
##########
@@ -102,6 +102,6 @@ class DefaultSource extends CreatableRelationProvider with RelationProvider
       conn.close()
     }
 
-    createRelation(sqlContext, parameters)
+    JDBCRelation(Array.empty, new JDBCOptions(parameters))(sqlContext.sparkSession)

Review comment:
       Why not call createRelation to generate partition info, and give an empty partition? Because this is sink, partition alway be empty?




-- 
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-unsubscribe@seatunnel.apache.org

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