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

rand(null) should be supported

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.0.0, 2.0.1
    • 2.1.0
    • SQL
    • None
    • spark version:2.0.0
      Linuxversion: Suse 11.3

    Description

      In spark2.0, when run spark-sql and try to do select rand(null), it failed and the error message as follows:
      > select rand(null);
      INFO SparkSqlParser: Parsing command: select rand(null)
      Error in query: Input argument to rand must be an integer literal.;; line 1 pos 7

      In hive or mysql, I do the same operation(select rand(null)), it will success and the value of rand(null) is the same with rand(0).

      this issue has fixed in Hive, the jira link as follows:
      https://issues.apache.org/jira/browse/HIVE-14694

      Attachments

        Activity

          People

            gurwls223 Hyukjin Kwon
            erlu chenerlu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: