Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-21446

[SQL] JDBC Postgres fetchsize parameter ignored again

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0, 2.1.1, 2.2.0
    • 2.1.2, 2.2.1, 2.3.0
    • SQL
    • None

    Description

      This bug was fixed in https://github.com/apache/spark/pull/9861
      but reappears in spark 2.1 +
      The following code may not be executed in org.apache.spark.sql.jdbc.PostgresDialect because "properties" is "asConnectionProperties" but "asConnectionProperties" can not have "fetchsize"

      if (properties.getOrElse(JDBCOptions.JDBC_BATCH_FETCH_SIZE, "0").toInt > 0) {
            connection.setAutoCommit(false)
      }
      

      Attachments

        Activity

          People

            DFFuture Zhang Chengbo
            DFFuture Zhang Chengbo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: