Pig
  1. Pig
  2. PIG-3031

Update Pig to use a newer version of joda-time

    Details

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

      Description

      The current version is 1.6, which is quite old (~4 years at this point). Is there any reason not to bring us up to a newer version? I tried to compile the 1.6 source and it didn't work because dependencies are outdated, and so on. Also, the interfaces have matured.

      1. PIG-3031.patch
        1 kB
        Zhijie Shen
      2. PIG-3031_1.patch
        2 kB
        Zhijie Shen
      3. PIG-3031_2.patch
        3 kB
        Cheolsoo Park

        Activity

        Hide
        Cheolsoo Park added a comment -

        Committed to trunk. Thanks Zhijie!

        Show
        Cheolsoo Park added a comment - Committed to trunk. Thanks Zhijie!
        Hide
        Cheolsoo Park added a comment -

        +1.

        Thank you for the explanation Zhijie! The test passes for me too.

        I added that link to the doc for the ToDate built-in function.

        Please see <a href="http://joda-time.sourceforge.net/timezones.html">the Joda-Time doc</a> for available timezone IDs.
        
        Show
        Cheolsoo Park added a comment - +1. Thank you for the explanation Zhijie! The test passes for me too. I added that link to the doc for the ToDate built-in function. Please see <a href= "http: //joda-time.sourceforge.net/timezones.html" >the Joda-Time doc</a> for available timezone IDs.
        Hide
        Zhijie Shen added a comment -

        Hi Cheolsoo,

        The problem is that DateTimeZone#forID becomes case-insensitively when receiving the timezone ID. See the following url:

        http://joda-time.sourceforge.net/upgradeto200.html

        And please try the newest patch.

        In addition, I think it should be good to include the following link:

        http://joda-time.sourceforge.net/timezones.html

        somewhere in the Pig manual, such that users can know what timezone IDs they can input.

        Thanks,
        Zhijie

        Show
        Zhijie Shen added a comment - Hi Cheolsoo, The problem is that DateTimeZone#forID becomes case-insensitively when receiving the timezone ID. See the following url: http://joda-time.sourceforge.net/upgradeto200.html And please try the newest patch. In addition, I think it should be good to include the following link: http://joda-time.sourceforge.net/timezones.html somewhere in the Pig manual, such that users can know what timezone IDs they can input. Thanks, Zhijie
        Hide
        Cheolsoo Park added a comment -

        Yes, I used the patch that you provided on this jira. Thanks for taking a look at it.

        Show
        Cheolsoo Park added a comment - Yes, I used the patch that you provided on this jira. Thanks for taking a look at it.
        Hide
        Zhijie Shen added a comment -

        Hi Cheolsoo,

        Which version are you going to upgrade to? 2.1? I'd like to investigate the problem.

        Thanks,
        Zhijie

        Show
        Zhijie Shen added a comment - Hi Cheolsoo, Which version are you going to upgrade to? 2.1? I'd like to investigate the problem. Thanks, Zhijie
        Hide
        Cheolsoo Park added a comment -

        Unfortunately, there is a failure:

        Testcase: testConversionBetweenDateTimeAndString took 0.041 sec
                Caused an ERROR
        The datetime zone id 'asia/singapore' is not recognised
        java.lang.IllegalArgumentException: The datetime zone id 'asia/singapore' is not recognised
                at org.joda.time.DateTimeZone.forID(DateTimeZone.java:223)
                at org.apache.pig.builtin.ToDate3ARGS.exec(ToDate3ARGS.java:21)
                at org.apache.pig.test.TestBuiltin.testConversionBetweenDateTimeAndString(TestBuiltin.java:408)
        
        Show
        Cheolsoo Park added a comment - Unfortunately, there is a failure: Testcase: testConversionBetweenDateTimeAndString took 0.041 sec Caused an ERROR The datetime zone id 'asia/singapore' is not recognised java.lang.IllegalArgumentException: The datetime zone id 'asia/singapore' is not recognised at org.joda.time.DateTimeZone.forID(DateTimeZone.java:223) at org.apache.pig.builtin.ToDate3ARGS.exec(ToDate3ARGS.java:21) at org.apache.pig.test.TestBuiltin.testConversionBetweenDateTimeAndString(TestBuiltin.java:408)
        Hide
        Jonathan Coveney added a comment -

        Sounds good, thanks y'all.

        Show
        Jonathan Coveney added a comment - Sounds good, thanks y'all.
        Hide
        Cheolsoo Park added a comment -

        I will commit the patch after running tests.

        Show
        Cheolsoo Park added a comment - I will commit the patch after running tests.
        Hide
        Zhijie Shen added a comment -

        It should be safe to update joda to the latest version (2.1).

        I've built the sources successfully, but haven't tried the test cases.

        Show
        Zhijie Shen added a comment - It should be safe to update joda to the latest version (2.1). I've built the sources successfully, but haven't tried the test cases.

          People

          • Assignee:
            Zhijie Shen
            Reporter:
            Jonathan Coveney
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development