Repository: incubator-hawq
Updated Branches:
  refs/heads/HAWQ-1053 [created] f847f2617


HAWQ-1053. Fixed extraction logic for varchar type.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/f847f261
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/f847f261
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/f847f261

Branch: refs/heads/HAWQ-1053
Commit: f847f26173c2e032b4a73757843c04fdbd86b28a
Parents: 6416b53
Author: Oleksandr Diachenko <[email protected]>
Authored: Thu Sep 15 13:49:21 2016 -0700
Committer: Oleksandr Diachenko <[email protected]>
Committed: Thu Sep 15 13:49:21 2016 -0700

----------------------------------------------------------------------
 src/backend/access/external/pxffilters.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f847f261/src/backend/access/external/pxffilters.c
----------------------------------------------------------------------
diff --git a/src/backend/access/external/pxffilters.c 
b/src/backend/access/external/pxffilters.c
index cdb2cb6..adfa782 100644
--- a/src/backend/access/external/pxffilters.c
+++ b/src/backend/access/external/pxffilters.c
@@ -494,14 +494,25 @@ get_attrs_from_expr(Expr *expr)
                rightop = (Node *) lsecond(saop->args);
        }
 
+       //Process left operand
        if (IsA(leftop, Var))
        {
                attrs = append_attr_from_var((Var *) leftop, attrs);
        }
-       if (IsA(leftop, Const))
+       if (IsA(leftop, RelabelType))
+       {
+               attrs = append_attr_from_var((Var *) ((RelabelType *) 
leftop)->arg, attrs);
+       }
+
+       //Process right operand
+       if (IsA(rightop, Var))
        {
                attrs = append_attr_from_var((Var *) rightop, attrs);
        }
+       if (IsA(rightop, RelabelType))
+       {
+               attrs = append_attr_from_var((Var *) ((RelabelType *) 
rightop)->arg, attrs);
+       }
 
        return attrs;
 

Reply via email to