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

The function of `month` and `day` return a value which is not we expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.1.0, 2.2.0
    • 2.2.0
    • SQL
    • None

    Description

      spark-sql>select month("1582-09-28");
      spark-sql>10
      For this case, the expected result is 9, but it is 10.

      spark-sql>select day("1582-04-18");
      spark-sql>28
      For this case, the expected result is 18, but it is 28.

      Attachments

        Activity

          People

            10110346 liuxian
            10110346 liuxian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: