Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4617

dayofmonth() function returns incorrect result for date type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Functions - Drill
    • None

    Description

      git.commit.id=e4725ea53dce58499974be93b3da87388e7df51c

      For character type, the dayofmonth function returns correct data:

      select dayofmonth(cast('2016-04-09' as varchar(10))) from test_tbl limit 1;
      ---------

      EXPR$0

      ---------

      9

      ---------

      For date type, the dayofmonth function returns incorrect data:

      select dayofmonth(cast('2016-04-09' as date)) from test_tbl limit 1;
      ---------

      EXPR$0

      ---------

      8

      ---------

      Attachments

        Activity

          People

            Unassigned Unassigned
            knguyen Krystal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: