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

Thriftserver with spark.sql.datetime.java8API.enabled=true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • SQL
    • None

    Description

        test("spark.sql.datetime.java8API.enabled=true") {
          withJdbcStatement() { st =>
            st.execute("set spark.sql.datetime.java8API.enabled=true")
            val rs = st.executeQuery("select timestamp '2020-05-28 00:00:00'")
            rs.next()
            // scalastyle:off
            println(rs.getObject(1))
          }
        }
      

      fails with

      HiveThriftBinaryServerSuite:
      java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
              at java.sql.Timestamp.valueOf(Timestamp.java:204)
              at org.apache.hive.jdbc.HiveBaseResultSet.evaluate(HiveBaseResultSet.java:444)
              at org.apache.hive.jdbc.HiveBaseResultSet.getColumnValue(HiveBaseResultSet.java:424)
              at org.apache.hive.jdbc.HiveBaseResultSet.getObject(HiveBaseResultSet.java:464
      

      It seems it might be needed in HiveResult.toHiveString?
      cc maxgekk

      Attachments

        Issue Links

          Activity

            People

              juliuszsompolski Juliusz Sompolski
              juliuszsompolski Juliusz Sompolski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: