Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: None
    • Labels:
      None

      Description

      EXTRACT (field FROM source)

      it returns field part of source.
      source must be a value expression of type timestamp, time, or interval.
      For date type, it should be cast to timestamp and used.

      field can be:

      • century
      • day: for timestamp, the day of the month (1 - 31); for interval, the number of days
      • decade: the year divided by 10
      • dow: the day of the week as Sunday(0) to Saturday(6)
      • doy: the day of the year (1 - 365)
      • epoch: for timestamp, the number of seconds since 1970-01-01 00:00:00 UTC (can be negative); for interval values, the total number of seconds in the interval
      • hour
      • isodow: the day of the week as Monday(1) to Sunday(7)
      • isoyear: the ISO 8601 year, which begins with the Monday of the week containing the 4th of January, so in early January or late December the ISO year may be different from the Gregorian year.
      • microseconds
      • millennium
      • milliseconds
      • minute
      • month
      • quarter: the quarter of the year (1 - 4)
      • second:the seconds field, including fractional parts
      • timezone: the time zone offset from UTC, measured in seconds
      • timezone_hour: the hour component of the time zone offset
      • timezone_minute: the minute component of the time zone offset
      • week
      • year

      Detailed explanation can be found in http://www.postgresql.org/docs/9.1/static/functions-datetime.html

      1. TAJO-449_5.patch
        41 kB
        Hyunsik Choi

        Activity

        Hide
        sirpkt Keuntae Park added a comment -

        Full implementation of this issue requires interval data type, which is not implemented yet.

        Show
        sirpkt Keuntae Park added a comment - Full implementation of this issue requires interval data type, which is not implemented yet.
        Hide
        hyunsik Hyunsik Choi added a comment -

        ++1 for this feature.

        Show
        hyunsik Hyunsik Choi added a comment - ++1 for this feature.
        Hide
        sirpkt Keuntae Park added a comment - - edited

        I created a review request in RB https://reviews.apache.org/r/16681/

        Please review it.

        Show
        sirpkt Keuntae Park added a comment - - edited I created a review request in RB https://reviews.apache.org/r/16681/ Please review it.
        Hide
        hyunsik Hyunsik Choi added a comment -

        I've uploaded the latest patch submitted in RB in order to launch a precommit test.

        Show
        hyunsik Hyunsik Choi added a comment - I've uploaded the latest patch submitted in RB in order to launch a precommit test.
        Hide
        sirpkt Keuntae Park added a comment -

        It got +1 in RB. I just committed it to master branch.
        Thank you for the review.

        Show
        sirpkt Keuntae Park added a comment - It got +1 in RB. I just committed it to master branch. Thank you for the review.

          People

          • Assignee:
            sirpkt Keuntae Park
            Reporter:
            sirpkt Keuntae Park
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development