Pig
  1. Pig
  2. PIG-2980

documentation for DateTime datatype

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11
    • Component/s: documentation
    • Labels:
      None

      Description

      Documentation for new DateTime type needs to be added.

      1. PIG-2980.2.patch
        30 kB
        Thejas M Nair
      2. PIG-2980.patch
        41 kB
        Zhijie Shen

        Issue Links

          Activity

          Hide
          Thejas M Nair added a comment -

          Patch committed to trunk and branch-0.11

          Show
          Thejas M Nair added a comment - Patch committed to trunk and branch-0.11
          Hide
          Thejas M Nair added a comment -

          Updated patch with small change to remove datestamp field from the constants table.

          Show
          Thejas M Nair added a comment - Updated patch with small change to remove datestamp field from the constants table.
          Hide
          Thejas M Nair added a comment -

          Yes, I mean ToDate('1970-01-01T00:00:00.000+00:00'). where users can specify a constant string to create a datetime object. Let me rephrase the description here.

          I think we can just remove datestamp from the constants table and add a note under the table, that users should use ToDate udf to generate datetime from string constants.

          Show
          Thejas M Nair added a comment - Yes, I mean ToDate('1970-01-01T00:00:00.000+00:00'). where users can specify a constant string to create a datetime object. Let me rephrase the description here. I think we can just remove datestamp from the constants table and add a note under the table, that users should use ToDate udf to generate datetime from string constants.
          Hide
          Zhijie Shen added a comment -

          Yes, I mean ToDate('1970-01-01T00:00:00.000+00:00'). where users can specify a constant string to create a datetime object. Let me rephrase the description here.

          Show
          Zhijie Shen added a comment - Yes, I mean ToDate('1970-01-01T00:00:00.000+00:00'). where users can specify a constant string to create a datetime object. Let me rephrase the description here.
          Hide
          Thejas M Nair added a comment -

          Thanks for the patch Zhijie. It looks good.
          But it says that datestamp constants are supported, but I guess if you pass '1970-01-01T00:00:00.000+00:00' to pig (say as an argument to a udf), i believe it would get interpreted as a string . Ie, we support chararray constants that can be cast to datetime, but not a datetime constant per se. Is that correct ?
          (I think it makes sense to support datetime constants, using a format that does not cause ambiguity wrt chararray type. But that would be another jira).

          Show
          Thejas M Nair added a comment - Thanks for the patch Zhijie. It looks good. But it says that datestamp constants are supported, but I guess if you pass '1970-01-01T00:00:00.000+00:00' to pig (say as an argument to a udf), i believe it would get interpreted as a string . Ie, we support chararray constants that can be cast to datetime, but not a datetime constant per se. Is that correct ? (I think it makes sense to support datetime constants, using a format that does not cause ambiguity wrt chararray type. But that would be another jira).
          Hide
          Zhijie Shen added a comment -

          Hi Thejas and Olga,

          here's the documentation for datetime. Please help proof-reading. Thanks!

          Regards,
          Zhijie

          Show
          Zhijie Shen added a comment - Hi Thejas and Olga, here's the documentation for datetime. Please help proof-reading. Thanks! Regards, Zhijie
          Hide
          Olga Natkovich added a comment -

          Sounds good. Zhijie, please, re-assign to me once you provide the information, thanks!

          Show
          Olga Natkovich added a comment - Sounds good. Zhijie, please, re-assign to me once you provide the information, thanks!
          Hide
          Thejas M Nair added a comment -

          Olga,
          Zhijie is planning to work on this. If you can help with the formatting, that would be great!

          Show
          Thejas M Nair added a comment - Olga, Zhijie is planning to work on this. If you can help with the formatting, that would be great!
          Hide
          Olga Natkovich added a comment -

          Who would be a good person to provide content. I would be happy to create and commit the patch

          Show
          Olga Natkovich added a comment - Who would be a good person to provide content. I would be happy to create and commit the patch

            People

            • Assignee:
              Zhijie Shen
              Reporter:
              Thejas M Nair
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development