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

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

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersStop watchingWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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 Max Gekk

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            juliuszsompolski Juliusz Sompolski Assign to me
            juliuszsompolski Juliusz Sompolski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment