You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Yan Zhou (JIRA)" <ji...@apache.org> on 2010/12/10 18:31:01 UTC
[jira] Created: (PIG-1762) Logic simplification does not work on
map key referenced values
Logic simplification does not work on map key referenced values
---------------------------------------------------------------
Key: PIG-1762
URL: https://issues.apache.org/jira/browse/PIG-1762
Project: Pig
Issue Type: Bug
Affects Versions: 0.8.0
Reporter: Yan Zhou
Assignee: Yan Zhou
Priority: Minor
Fix For: 0.9.0
Logical expression simplification, introduced in PIG-1399, can not handle the map key referenced value in such expressions. For instance, the following statement causes exception thrown:
b = filter (load 'd.txt' as (k1, k2, k3, v1, v2, v3)) by k2#'f1'#'f' is not null and (v2#'f'#'f1' is not null or v2#'f'#'f2' is not null;
The problem is that if the operand of AND/OR is not a terminal, the current use of stack to store the operand's results won't work because the the used AllSameExpressionVisitor is inadequate in that it visits all expressions while we only need to visit both children of AND/OR.
Another problem is that MapLookupExpression.isEqual method only checks for the top level map references. For instance, m#k1 and m#k2 will be regarded equal. We need to check recursively if nested map key reference is present.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-1762) Logic simplification does not work on
map key referenced values
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-1762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-1762:
--------------------------------
Priority: Major (was: Minor)
Fix Version/s: (was: 0.9.0)
0.8.0
> Logic simplification does not work on map key referenced values
> ---------------------------------------------------------------
>
> Key: PIG-1762
> URL: https://issues.apache.org/jira/browse/PIG-1762
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.0
> Reporter: Yan Zhou
> Assignee: Yan Zhou
> Fix For: 0.8.0
>
>
> Logical expression simplification, introduced in PIG-1399, can not handle the map key referenced value in such expressions. For instance, the following statement causes exception thrown:
> b = filter (load 'd.txt' as (k1, k2, k3, v1, v2, v3)) by k2#'f1'#'f' is not null and (v2#'f'#'f1' is not null or v2#'f'#'f2' is not null;
> The problem is that if the operand of AND/OR is not a terminal, the current use of stack to store the operand's results won't work because the the used AllSameExpressionVisitor is inadequate in that it visits all expressions while we only need to visit both children of AND/OR.
> Another problem is that MapLookupExpression.isEqual method only checks for the top level map references. For instance, m#k1 and m#k2 will be regarded equal. We need to check recursively if nested map key reference is present.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-1762) Logic simplification does not work on
map key referenced values
Posted by "Yan Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-1762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yan Zhou updated PIG-1762:
--------------------------
Attachment: PIG-1762.patch
> Logic simplification does not work on map key referenced values
> ---------------------------------------------------------------
>
> Key: PIG-1762
> URL: https://issues.apache.org/jira/browse/PIG-1762
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.0
> Reporter: Yan Zhou
> Assignee: Yan Zhou
> Fix For: 0.8.0
>
> Attachments: PIG-1762.patch
>
>
> Logical expression simplification, introduced in PIG-1399, can not handle the map key referenced value in such expressions. For instance, the following statement causes exception thrown:
> b = filter (load 'd.txt' as (k1, k2, k3, v1, v2, v3)) by k2#'f1'#'f' is not null and (v2#'f'#'f1' is not null or v2#'f'#'f2' is not null;
> The problem is that if the operand of AND/OR is not a terminal, the current use of stack to store the operand's results won't work because the the used AllSameExpressionVisitor is inadequate in that it visits all expressions while we only need to visit both children of AND/OR.
> Another problem is that MapLookupExpression.isEqual method only checks for the top level map references. For instance, m#k1 and m#k2 will be regarded equal. We need to check recursively if nested map key reference is present.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (PIG-1762) Logic simplification does not work on
map key referenced values
Posted by "Yan Zhou (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-1762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yan Zhou resolved PIG-1762.
---------------------------
Resolution: Fixed
test-patch and test-core pass cleanly. Committed to both trunk and the 0.8 branch.
> Logic simplification does not work on map key referenced values
> ---------------------------------------------------------------
>
> Key: PIG-1762
> URL: https://issues.apache.org/jira/browse/PIG-1762
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.0
> Reporter: Yan Zhou
> Assignee: Yan Zhou
> Fix For: 0.8.0
>
> Attachments: PIG-1762.patch
>
>
> Logical expression simplification, introduced in PIG-1399, can not handle the map key referenced value in such expressions. For instance, the following statement causes exception thrown:
> b = filter (load 'd.txt' as (k1, k2, k3, v1, v2, v3)) by k2#'f1'#'f' is not null and (v2#'f'#'f1' is not null or v2#'f'#'f2' is not null;
> The problem is that if the operand of AND/OR is not a terminal, the current use of stack to store the operand's results won't work because the the used AllSameExpressionVisitor is inadequate in that it visits all expressions while we only need to visit both children of AND/OR.
> Another problem is that MapLookupExpression.isEqual method only checks for the top level map references. For instance, m#k1 and m#k2 will be regarded equal. We need to check recursively if nested map key reference is present.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIG-1762) Logic simplification does not work on
map key referenced values
Posted by "Daniel Dai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-1762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970263#action_12970263 ]
Daniel Dai commented on PIG-1762:
---------------------------------
+1. Please commit if tests pass.
> Logic simplification does not work on map key referenced values
> ---------------------------------------------------------------
>
> Key: PIG-1762
> URL: https://issues.apache.org/jira/browse/PIG-1762
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.8.0
> Reporter: Yan Zhou
> Assignee: Yan Zhou
> Fix For: 0.8.0
>
> Attachments: PIG-1762.patch
>
>
> Logical expression simplification, introduced in PIG-1399, can not handle the map key referenced value in such expressions. For instance, the following statement causes exception thrown:
> b = filter (load 'd.txt' as (k1, k2, k3, v1, v2, v3)) by k2#'f1'#'f' is not null and (v2#'f'#'f1' is not null or v2#'f'#'f2' is not null;
> The problem is that if the operand of AND/OR is not a terminal, the current use of stack to store the operand's results won't work because the the used AllSameExpressionVisitor is inadequate in that it visits all expressions while we only need to visit both children of AND/OR.
> Another problem is that MapLookupExpression.isEqual method only checks for the top level map references. For instance, m#k1 and m#k2 will be regarded equal. We need to check recursively if nested map key reference is present.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.