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

Awkward changes for JdbcUtils.saveTable in Spark 2.1.0

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0
    • SQL
    • None

    Description

      The Change from JdbcUtils.saveTable(DataFrame, String, String, Property) to JdbcUtils.saveTable(DataFrame, String, String, JDBCOptions), not only incompatible to previous versions (so the previous code in java won't compile, but also introduced silly code change: One has to specify url and table twice like this:

      JDBCOptions jdbcOptions = new JDBCOptions(url, table, map);
      JdbcUtils.saveTable(ds, url, table,jdbcOptions);

      Why does one have to supply the same things ulr, table twice? (If you don't specify it in both places, the exception will be thrown).

      Attachments

        Activity

          People

            gurwls223 Hyukjin Kwon
            zwu.net@gmail.com Paul Wu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: