hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shiv...@apache.org
Subject [2/3] incubator-hawq git commit: Revert "HAWQ-779. support more pxf filter pushdwon"
Date Thu, 28 Jul 2016 16:38:46 GMT
Revert "HAWQ-779. support more pxf filter pushdwon"

This reverts commit 1a17238d34cf66cdc52ea257bcdfdd0bdb497054.


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

Branch: refs/heads/master
Commit: 18835269d1854fe56578e35be0bc2099099577e7
Parents: dfb12a1
Author: Shivram Mani <shivram.mani@gmail.com>
Authored: Wed Jul 27 18:13:33 2016 -0700
Committer: Shivram Mani <shivram.mani@gmail.com>
Committed: Wed Jul 27 18:13:33 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hawq/pxf/api/FilterParser.java   |  4 +-
 .../apache/hawq/pxf/api/FilterParserTest.java   |  8 ----
 .../pxf/plugins/hbase/HBaseFilterBuilder.java   |  2 -
 src/backend/access/external/pxffilters.c        | 48 +-------------------
 src/backend/optimizer/plan/createplan.c         |  2 +-
 src/include/access/pxffilters.h                 |  3 +-
 6 files changed, 5 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/18835269/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FilterParser.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FilterParser.java b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FilterParser.java
index 00fbf2b..ae96d22 100644
--- a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FilterParser.java
+++ b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/FilterParser.java
@@ -61,8 +61,7 @@ public class FilterParser {
         HDOP_GE,
         HDOP_EQ,
         HDOP_NE,
-        HDOP_AND,
-        HDOP_LIKE
+        HDOP_AND
     }
 
     /**
@@ -393,7 +392,6 @@ public class FilterParser {
         operatorTranslationMap.put(5, Operation.HDOP_EQ);
         operatorTranslationMap.put(6, Operation.HDOP_NE);
         operatorTranslationMap.put(7, Operation.HDOP_AND);
-        operatorTranslationMap.put(8, Operation.HDOP_LIKE);
         return operatorTranslationMap;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/18835269/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/FilterParserTest.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/FilterParserTest.java b/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/FilterParserTest.java
index fdde9f0..0308f7f 100644
--- a/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/FilterParserTest.java
+++ b/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/FilterParserTest.java
@@ -215,10 +215,6 @@ public class FilterParserTest {
         filter = "a1c2o7";
         op = Operation.HDOP_AND;
         runParseOneOperation("this filter was build from HDOP_AND", filter, op);
-
-        filter = "a1c2o8";
-        op = Operation.HDOP_LIKE;
-        runParseOneOperation("this filter was build from HDOP_LIKE", filter, op);
     }
 
     @Test
@@ -251,10 +247,6 @@ public class FilterParserTest {
         filter = "c2a1o7";
         op = Operation.HDOP_AND;
         runParseOneOperation("this filter was build from HDOP_AND using reverse!", filter,
op);
-
-        filter = "c2a1o8";
-        op = Operation.HDOP_LIKE;
-        runParseOneOperation("this filter was build from HDOP_LIKE using reverse!", filter,
op);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/18835269/pxf/pxf-hbase/src/main/java/org/apache/hawq/pxf/plugins/hbase/HBaseFilterBuilder.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-hbase/src/main/java/org/apache/hawq/pxf/plugins/hbase/HBaseFilterBuilder.java
b/pxf/pxf-hbase/src/main/java/org/apache/hawq/pxf/plugins/hbase/HBaseFilterBuilder.java
index 8dc932c..6dc271e 100644
--- a/pxf/pxf-hbase/src/main/java/org/apache/hawq/pxf/plugins/hbase/HBaseFilterBuilder.java
+++ b/pxf/pxf-hbase/src/main/java/org/apache/hawq/pxf/plugins/hbase/HBaseFilterBuilder.java
@@ -275,8 +275,6 @@ public class HBaseFilterBuilder implements FilterParser.FilterBuilder
{
                 startKey = Bytes.toBytes(key);
                 endKey = Bytes.add(Bytes.toBytes(key), zeroByte);
                 break;
-            default:
-                throw new Exception("unsupported operation for filtering " + op);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/18835269/src/backend/access/external/pxffilters.c
----------------------------------------------------------------------
diff --git a/src/backend/access/external/pxffilters.c b/src/backend/access/external/pxffilters.c
index a08c82f..f219738 100644
--- a/src/backend/access/external/pxffilters.c
+++ b/src/backend/access/external/pxffilters.c
@@ -78,7 +78,6 @@ dbop_pxfop_map pxf_supported_opr[] =
 	{665 /* text_le */, PXFOP_LE},
 	{667 /* text_ge */, PXFOP_GE},
 	{531 /* textlt  */, PXFOP_NE},
-	{1209 /* textlike  */, PXFOP_LIKE},
 
 	/* int2 to int4 */
 	{Int24EqualOperator /* int24eq */, PXFOP_EQ},
@@ -126,48 +125,7 @@ dbop_pxfop_map pxf_supported_opr[] =
 	{1871 /* int82gt */, PXFOP_GT},
 	{1872 /* int82le */, PXFOP_LE},
 	{1873 /* int82ge */, PXFOP_GE},
-	{1869 /* int82ne */, PXFOP_NE},
-
-	/**************FLOAT****************/
-	/* float4 */
-	{Float4EqualOperator  /* float4eq */, PXFOP_EQ},
-	{622  /* float4lt */, PXFOP_LT},
-	{623 /* float4gt */, PXFOP_GT},
-	{624 /* float4le */, PXFOP_LE},
-	{625 /* float4ge */, PXFOP_GE},
-	{621 /* float4ne */, 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},
-
-	/* float84 */
-	{1130  /* float84eq */, PXFOP_EQ},
-	{1132  /* float84lt */, PXFOP_LT},
-	{1133 /* float84gt */, PXFOP_GT},
-	{1134 /* float84le */, PXFOP_LE},
-	{1135 /* float84ge */, PXFOP_GE},
-	{1131 /* float84ne */, PXFOP_NE},
-
-	/**********DATE************/
-	{DateEqualOperator  /* eq */, PXFOP_EQ},
-	{1095  /* date_lt */, PXFOP_LT},
-	{1097 /* date_gt */, PXFOP_GT},
-	{1096 /* date_le */, PXFOP_LE},
-	{1098 /* date_ge */, PXFOP_GE},
-	{1094 /* date_ne */, PXFOP_NE}
+	{1869 /* int82ne */, PXFOP_NE}
 
 };
 
@@ -184,8 +142,7 @@ Oid pxf_supported_types[] =
 	BPCHAROID,
 	CHAROID,
 	BYTEAOID,
-	BOOLOID,
-	DATEOID
+	BOOLOID
 };
 
 /*
@@ -556,7 +513,6 @@ const_to_str(Const *constval, StringInfo buf)
 		case BPCHAROID:
 		case CHAROID:
 		case BYTEAOID:
-		case DATEOID:
 			appendStringInfo(buf, "\\\"%s\\\"", extval);
 			break;
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/18835269/src/backend/optimizer/plan/createplan.c
----------------------------------------------------------------------
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
index 65359bc..b5a5cea 100644
--- a/src/backend/optimizer/plan/createplan.c
+++ b/src/backend/optimizer/plan/createplan.c
@@ -1146,7 +1146,7 @@ static char** create_pxf_plan(char **segdb_file_map, RelOptInfo *rel,
int total_
 	Relation relation = RelationIdGetRelation(planner_rt_fetch(scan_relid, ctx->root)->relid);
 	segdb_work_map = map_hddata_2gp_segments(uri_str, 
 											 total_segs, segs_participating,
-											 relation, ctx->root->parse->jointree->quals);
+											 relation, NULL);
 	Assert(segdb_work_map != NULL);
 	RelationClose(relation);
 	

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/18835269/src/include/access/pxffilters.h
----------------------------------------------------------------------
diff --git a/src/include/access/pxffilters.h b/src/include/access/pxffilters.h
index 31481b5..358cd8b 100644
--- a/src/include/access/pxffilters.h
+++ b/src/include/access/pxffilters.h
@@ -44,8 +44,7 @@ typedef enum PxfOperatorCode
 	PXFOP_GE,
 	PXFOP_EQ,
 	PXFOP_NE,
-	PXFOP_AND,
-	PXFOP_LIKE
+	PXFOP_AND
 
 } PxfOperatorCode;
 


Mime
View raw message