[GitHub] incubator-hawq pull request #958: HAWQ-1048. Support OR, NOT logical operato...
Github user sansanichfb closed the pull request at: https://github.com/apache/incubator-hawq/pull/958 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-hawq pull request #958: HAWQ-1048. Support OR, NOT logical operato...
Github user kavinderd commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/958#discussion_r83111789 --- Diff: src/backend/access/external/pxffilters.c --- @@ -31,14 +31,14 @@ #include "utils/guc.h" #include "utils/lsyscache.h" -static List* pxf_make_filter_list(List* quals); +static List* pxf_make_expression_items_list(List *quals, Node *parent, bool *logicalOpsNum); static void pxf_free_filter(PxfFilterDesc* filter); -static void pxf_free_filter_list(List *filters); static char* pxf_serialize_filter_list(List *filters); static bool opexpr_to_pxffilter(OpExpr *expr, PxfFilterDesc *filter); static bool supported_filter_type(Oid type); static void const_to_str(Const *constval, StringInfo buf); static List* append_attr_from_var(Var* var, List* attrs); +static void enrichTrivialExpression(List *expressionItems); --- End diff -- change function signature to match style with underscores `enrich_trivial_expression` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-hawq pull request #958: HAWQ-1048. Support OR, NOT logical operato...
Github user sansanichfb commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/958#discussion_r83109402 --- Diff: src/backend/access/external/pxffilters.c --- @@ -626,16 +683,53 @@ char *serializePxfFilterQuals(List *quals) if (pxf_enable_filter_pushdown) { - List *filters = pxf_make_filter_list(quals); - result = pxf_serialize_filter_list(filters); - pxf_free_filter_list(filters); + int logicalOpsNum = 0; + List *expressionItems = pxf_make_expression_items_list(quals, NULL, &logicalOpsNum); + + //Trivial expression means list of OpExpr implicitly ANDed + bool isTrivialExpression = logicalOpsNum == 0 && expressionItems && expressionItems->length > 1; --- End diff -- In case of ORCA it does, but for standard optimizer it doesn't. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-hawq pull request #958: HAWQ-1048. Support OR, NOT logical operato...
Github user kavinderd commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/958#discussion_r83108994 --- Diff: src/backend/access/external/pxffilters.c --- @@ -135,7 +135,40 @@ dbop_pxfop_map pxf_supported_opr[] = {1097 /* date_gt */, PXFOP_GT}, {1096 /* date_le */, PXFOP_LE}, {1098 /* date_ge */, PXFOP_GE}, - {1094 /* date_ne */, PXFOP_NE} + {1094 /* date_ne */, PXFOP_NE}, + + /* float8 */ + {Float8EqualOperator /* float8eq */, PXFOP_EQ}, + {672 /* float8lt */, PXFOP_LT}, + {674 /* float8gt */, PXFOP_GT}, + {673 /* float8le */, PXFOP_LE}, + {675 /* float8ge */, PXFOP_GE}, + {671 /* float8ne */, PXFOP_NE}, + + /* float48 */ + {1120 /* float48eq */, PXFOP_EQ}, + {1122 /* float48lt */, PXFOP_LT}, + {1123 /* float48gt */, PXFOP_GT}, + {1124 /* float48le */, PXFOP_LE}, + {1125 /* float48ge */, PXFOP_GE}, + {1121 /* float48ne */, PXFOP_NE}, + + /* bpchar */ + {BPCharEqualOperator /* bpchareq */, PXFOP_EQ}, + {1058 /* bpcharlt */, PXFOP_LT}, + {1060 /* bpchargt */, PXFOP_GT}, + {1059 /* bpcharle */, PXFOP_LE}, + {1061 /* bpcharge */, PXFOP_GE}, + {1057 /* bpcharne */, PXFOP_NE} + + /* bytea */ + // TODO: uncomment ocne HAWQ-1085 is done --- End diff -- typo 'once' --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-hawq pull request #958: HAWQ-1048. Support OR, NOT logical operato...
GitHub user sansanichfb opened a pull request: https://github.com/apache/incubator-hawq/pull/958 HAWQ-1048. Support OR, NOT logical operators in the HAWQ/PXF Bridge. You can merge this pull request into a Git repository by running: $ git pull https://github.com/sansanichfb/incubator-hawq HAWQ-1048 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-hawq/pull/958.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #958 commit cd186f6fb3ab6bc74833ef5184da03f113ee7995 Author: Oleksandr Diachenko Date: 2016-09-17T02:00:50Z HAWQ-1048. Draft implementation. commit 7ef7e0fbfe332d28755175045b1835f5c1117e25 Author: Oleksandr Diachenko Date: 2016-09-19T21:05:22Z HAWQ-1048. Added free logic. commit 7a9cc88df6b53bbe6cb9b6e5735f08da1a651a42 Author: Oleksandr Diachenko Date: 2016-09-20T00:01:25Z HAWQ-1048. Updated comments. commit 0ff70373b3b700028892c72fd9e1fb516bbcaa25 Author: Oleksandr Diachenko Date: 2016-09-22T01:19:18Z HAWQ-1048. Return NULL instead of empty string. commit 694ad0383cce829057636365a87b92056bb52e03 Author: Oleksandr Diachenko Date: 2016-09-22T18:43:19Z HAWQ-1048. Discard whole filter if at least one operator is not supported. commit 98bc759fe34363121049fd2f08ed6d72679082b9 Author: Oleksandr Diachenko Date: 2016-09-22T20:34:20Z HAWQ-1048. Added filter-push down support for float8. commit d1873951dbca3928fef948044a948d5477ae7fe9 Author: Oleksandr Diachenko Date: 2016-09-22T23:45:57Z HAWQ-1048. Added filter-push down support for bpchar, bytea. commit 9225016bdff957afb6f4d3d21c65d2daaa454b05 Author: Oleksandr Diachenko Date: 2016-09-22T23:46:46Z Merge branch 'master' into HAWQ-1048 commit d563ab5b184b07b86406659ebe0abec7e4915d81 Author: Oleksandr Diachenko Date: 2016-09-24T01:35:41Z HAWQ-1048. Changed logic to support more than one logical operator in list. commit 38cb4b0040122992837c9655d52241b6b9757529 Author: Oleksandr Diachenko Date: 2016-09-26T19:23:32Z HAWQ-1048. Updated log level to DEBUG1. commit dffc760de7c1ed9ec1a40e5e94d16be202e75b97 Author: Oleksandr Diachenko Date: 2016-10-03T20:17:10Z HAWQ-1048. Fixed unit-tests. commit bbfde70d90ceece472a4c5df17761b0369b4936d Author: Oleksandr Diachenko Date: 2016-10-06T21:53:18Z HAWQ-1048. Do not send filter string on fragmenter call. commit 2ebc98a191f4086a10f79b1dc00b4bb6934a7e5f Author: Oleksandr Diachenko Date: 2016-10-06T21:55:13Z HAWQ-1048. Do not send filter string on fragmenter call. commit 071c300808f4f35c254f9b66e8e4ddde8e8483d4 Author: Oleksandr Diachenko Date: 2016-10-08T00:41:17Z HAWQ-1048. Fixed filter builder for ORCA/default optimizer. commit 8f03f3aba638490a49714e0afda3f003376fa768 Author: Oleksandr Diachenko Date: 2016-10-10T19:34:27Z HAWQ-1048. Added support for float48. commit d4f071af998355d680a2cf81fb2d28c3063b3734 Author: Oleksandr Diachenko Date: 2016-10-11T22:27:46Z HAWQ-1048. Updated unit-tests. commit ce6606b66d2b192dbca9e734eaab6c3fe848df37 Author: Oleksandr Diachenko Date: 2016-10-11T23:35:58Z HAWQ-1048. Disabled freeing logic. commit f44e0b2f5a9bdfcf7eaf491034d1ae850197dafe Author: Oleksandr Diachenko Date: 2016-10-11T23:49:47Z HAWQ-1048. Fixed free logic for BoolExpr nodes. commit 0e2d341449d8217184150310bd3bf21083ef803c Author: Oleksandr Diachenko Date: 2016-10-11T23:51:38Z HAWQ-1048. Fixed free logic for BoolExpr nodes. commit 83560c5bc73449d0dff382313d26704eb2e68742 Author: Oleksandr Diachenko Date: 2016-10-11T23:57:30Z HAWQ-1048. Renamed free method. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---