[ 
https://issues.apache.org/jira/browse/PIG-3087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15496268#comment-15496268
 ] 

Adam Szita commented on PIG-3087:
---------------------------------

Taken a look on this. It seems that quite some mysterious (failing in grunt if 
inputted manually, but passing in unit test mode) test cases are resulted from 
query validation being off.
In the patch I attached (PIG-3087.1.patch) I have this enabled and also went 
through and fixed several test cases so that they pass (or fail with expected 
exception) properly.
I also found a bug in ForEachUserSchemaVisitor during the process: it seems 
that it can't handle use cases where casting is in the latest (foreach) step of 
the plan - so I fixed this as well: testQuery90a tests this.

[~daijy] can you please take a look when you get a chance?

> Refactor TestLogicalPlanBuilder to be meaningful
> ------------------------------------------------
>
>                 Key: PIG-3087
>                 URL: https://issues.apache.org/jira/browse/PIG-3087
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Jonathan Coveney
>            Assignee: Adam Szita
>              Labels: newbie
>             Fix For: 0.17.0
>
>         Attachments: PIG-3087-0.patch, PIG-3087.1.patch
>
>
> I started doing this as part of another patch, but there are some bigger 
> issues, and I don't have the time to dig in atm.
> That said, a lot of the tests as written don't test anything. I used more 
> modern junit patterns, and discovered we had a lot of tests that weren't 
> functioning properly. Making them function properly unveiled that the general 
> buildLp pattern doesn't work properly anymore for many cases where it would 
> throw an error in grunt, but for whatever reason no error is thrown in the 
> tests.
> Any test with _1 is a test that previous failed, that now doesn't. Some, 
> however, don't make sense so I think what really needs to be done is figure 
> out which should be failing, which shouldn't, and then fix buildLp 
> accordingly.
> I will attach my pass at it, but it is incomplete and needs work.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to