Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish support for Pig 0.12 #69

Merged
merged 4 commits into from Oct 30, 2013
Merged

Finish support for Pig 0.12 #69

merged 4 commits into from Oct 30, 2013

Conversation

jarcec
Copy link
Contributor

@jarcec jarcec commented Oct 23, 2013

Pig 0.12.0 has added several new keywords such as "Assert" or "In" (via PIG-3367 and PIG-3269). This is causing issues to DataFu UDFs with the same name. I wasn't able to find any other solution other then renaming the UDFs in question. I do understand that this is very intrusive change, so I've provided deprecated ones for backward compatibility - e.g users on Pig 0.11.0 will still be able to use the Assert or In as they are now.

After applying this final set of changes I was able to run all unit tests against Pig 0.12.0 without any issues!

Jarek Jarcec Cecho added 4 commits October 23, 2013 14:42
PIG-3367 has introduced a new keyword "ASSERT" in version 0.12.0 and thus the same named UDF can not be used any more. I've renamed the UDF to "AssertUDF" to enable the UDF in pig 0.12.0 and provided a compatible layer to not break users that are still using Pig 0.11.0.
PIG-3269 has introduced a new keyword "IN" in version 0.12.0 and thus the same named UDF can not be used any more. I've renamed the UDF to "InUDF" to enable the UDF in pig 0.12.0 and provided a compatible layer to not break users that are still using Pig 0.11.0.
@matthayes
Copy link
Contributor

What are the issues you observe with Assert and In? When I tried running the unit tests earlier with Pig 0.12.0 I thought all the unit tests passed.

@jarcec
Copy link
Contributor Author

jarcec commented Oct 24, 2013

Hi Matt,
thank you for reviewing proposed changes, I appreciate your time and effort! When I execute the AssertTests against PIG 0.12.0 using for example this command:

ant clean test -Dtest.methods=datafu.test.pig.util.AssertTests.shouldNotAssertWithoutMessageOnOne -Dpig.version=0.12.0

It will fail with following exception:

org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. <line 1, column 7> mismatched input 'ASSERT' expecting IDENTIFIER

This make complete sense as we are having definition using "assert" which is a keyword now, so I've tried to change the test define ASR instead, but that did not quite help as now Pig seems to be unhappy with the "Assert" part of the UDF definition (datafu.pig.util.Assert):

org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. <line 1, column 28> Syntax error, unexpected symbol at or near 'Assert'

I've tried couple of experiments, such as removing the "define" and using the Assert UDF directly in the FILTER operator but nothing has worked for me. If you have any other idea, please don't hesitate and let me know. I'll be more than happy to refactore proposed changes.

@matthayes
Copy link
Contributor

Okay yea I just tried this and got the same error. I think your proposal makes sense. Let me think on it for a bit.

@jarcec
Copy link
Contributor Author

jarcec commented Oct 25, 2013

Please take your time sir!

matthayes added a commit that referenced this pull request Oct 30, 2013
Finish support for Pig 0.12
@matthayes matthayes merged commit ecc9b7a into LinkedInAttic:master Oct 30, 2013
@jarcec
Copy link
Contributor Author

jarcec commented Oct 30, 2013

Thank you Matt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants