@@ -38,7 +38,7 @@ public void testFilterPushDownRowKeyEqual() throws Exception {
38
38
39
39
runHBaseSQLVerifyCount (sql , 1 );
40
40
41
- final String [] expectedPlan = {".*startRow=b4 , stopRow=b4\\ \\ x00, filter=null .*" };
41
+ final String [] expectedPlan = {".*startRow=\" b4 \" , stopRow=\" b4\\ \\ x00\" .*" };
42
42
final String [] excludedPlan ={};
43
43
final String sqlHBase = canonizeHBaseSQL (sql );
44
44
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -56,7 +56,7 @@ public void testFilterPushDownRowKeyNotEqual() throws Exception {
56
56
57
57
runHBaseSQLVerifyCount (sql , 7 );
58
58
59
- final String [] expectedPlan = {".*startRow=, stopRow=, filter=RowFilter \\ (NOT_EQUAL, b4\\ ).*" };
59
+ final String [] expectedPlan = {".*startRow=\" \" , stopRow=\" \" , filter=\" RowFilter \\ (NOT_EQUAL, b4\\ )\" .*" };
60
60
final String [] excludedPlan ={};
61
61
final String sqlHBase = canonizeHBaseSQL (sql );
62
62
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -74,7 +74,7 @@ public void testFilterPushDownRowKeyEqualWithItem() throws Exception {
74
74
75
75
runHBaseSQLVerifyCount (sql , 1 );
76
76
77
- final String [] expectedPlan = {".*startRow=b4 , stopRow=b4\\ \\ x00, filter=null .*" };
77
+ final String [] expectedPlan = {".*startRow=\" b4 \" , stopRow=\" b4\\ \\ x00\" .*" };
78
78
final String [] excludedPlan ={".*startRow=null, stopRow=null.*" };
79
79
final String sqlHBase = canonizeHBaseSQL (sql );
80
80
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -489,7 +489,7 @@ public void testFilterPushDownRowKeyLike() throws Exception {
489
489
490
490
runHBaseSQLVerifyCount (sql , 21 );
491
491
492
- final String [] expectedPlan = {".*filter=FilterList OR.*EQUAL.*EQUAL.*" };
492
+ final String [] expectedPlan = {".*filter=\" FilterList OR.*EQUAL.*EQUAL.*\" " };
493
493
final String [] excludedPlan ={};
494
494
final String sqlHBase = canonizeHBaseSQL (sql );
495
495
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -507,7 +507,7 @@ public void testFilterPushDownRowKeyLikeWithEscape() throws Exception {
507
507
508
508
runHBaseSQLVerifyCount (sql , 2 );
509
509
510
- final String [] expectedPlan = {".*startRow=\\ %_AS_PREFIX_, stopRow=\\ %_AS_PREFIX`, filter=RowFilter.*EQUAL.*" };
510
+ final String [] expectedPlan = {".*startRow=\" \\ %_AS_PREFIX_\" , stopRow=\" \\ %_AS_PREFIX`\" , filter=\" RowFilter.*EQUAL.*\" " };
511
511
final String [] excludedPlan ={};
512
512
final String sqlHBase = canonizeHBaseSQL (sql );
513
513
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -525,7 +525,7 @@ public void testFilterPushDownRowKeyRangeAndColumnValueLike() throws Exception {
525
525
526
526
runHBaseSQLVerifyCount (sql , 22 );
527
527
528
- final String [] expectedPlan = {".*startRow=07 , stopRow=09 , filter=FilterList AND.*RowFilter \\ (GREATER_OR_EQUAL, 07\\ ), RowFilter \\ (LESS, 09\\ ), SingleColumnValueFilter \\ (f, c, EQUAL.*" };
528
+ final String [] expectedPlan = {".*startRow=\" 07 \" , stopRow=\" 09 \" , filter=\" FilterList AND.*RowFilter \\ (GREATER_OR_EQUAL, 07\\ ), RowFilter \\ (LESS, 09\\ ), SingleColumnValueFilter \\ (f, c, EQUAL.*\" " };
529
529
final String [] excludedPlan ={};
530
530
final String sqlHBase = canonizeHBaseSQL (sql );
531
531
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -543,7 +543,7 @@ public void testFilterPushDownRowKeyGreaterThan() throws Exception {
543
543
544
544
runHBaseSQLVerifyCount (sql , 4 );
545
545
546
- final String [] expectedPlan = {".*startRow=b4\\ \\ x00.* stopRow=, .*" };
546
+ final String [] expectedPlan = {".*startRow=\" b4\\ \\ x00\" , stopRow=\" \" .*" };
547
547
final String [] excludedPlan ={};
548
548
final String sqlHBase = canonizeHBaseSQL (sql );
549
549
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -561,7 +561,7 @@ public void testFilterPushDownRowKeyGreaterThanWithItem() throws Exception {
561
561
562
562
runHBaseSQLVerifyCount (sql , 2 );
563
563
564
- final String [] expectedPlan = {".*startRow=b4\\ \\ x00.*stopRow=, filter=null .*" };
564
+ final String [] expectedPlan = {".*startRow=\" b4\\ \\ x00\" .*stopRow=.*" };
565
565
final String [] excludedPlan ={};
566
566
final String sqlHBase = canonizeHBaseSQL (sql );
567
567
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -579,7 +579,7 @@ public void testFilterPushDownRowKeyBetween() throws Exception {
579
579
580
580
runHBaseSQLVerifyCount (sql , 3 );
581
581
582
- final String [] expectedPlan = {".*startRow=a2 , stopRow=b4\\ \\ x00, filter=FilterList AND.*GREATER_OR_EQUAL, a2.*LESS_OR_EQUAL, b4.*" };
582
+ final String [] expectedPlan = {".*startRow=\" a2 \" , stopRow=\" b4\\ \\ x00\" , filter=\" FilterList AND.*GREATER_OR_EQUAL, a2.*LESS_OR_EQUAL, b4.*\" " };
583
583
final String [] excludedPlan ={};
584
584
final String sqlHBase = canonizeHBaseSQL (sql );
585
585
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -597,7 +597,7 @@ public void testFilterPushDownRowKeyBetweenWithItem() throws Exception {
597
597
598
598
runHBaseSQLVerifyCount (sql , 3 );
599
599
600
- final String [] expectedPlan = {".*startRow=a2 , stopRow=b4\\ \\ x00, filter=FilterList AND.*GREATER_OR_EQUAL, a2.*LESS_OR_EQUAL, b4.*" };
600
+ final String [] expectedPlan = {".*startRow=\" a2 \" , stopRow=\" b4\\ \\ x00\" , filter=\" FilterList AND.*GREATER_OR_EQUAL, a2.*LESS_OR_EQUAL, b4.*\" " };
601
601
final String [] excludedPlan ={};
602
602
final String sqlHBase = canonizeHBaseSQL (sql );
603
603
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -615,7 +615,7 @@ public void testFilterPushDownMultiColumns() throws Exception {
615
615
616
616
runHBaseSQLVerifyCount (sql , 5 );
617
617
618
- final String [] expectedPlan = {".*startRow=, stopRow=, filter=FilterList OR.*GREATER_OR_EQUAL, b5.*LESS_OR_EQUAL, a2.*" };
618
+ final String [] expectedPlan = {".*startRow=\" \" , stopRow=\" \" , filter=\" FilterList OR.*GREATER_OR_EQUAL, b5.*LESS_OR_EQUAL, a2.*\" " };
619
619
final String [] excludedPlan ={};
620
620
final String sqlHBase = canonizeHBaseSQL (sql );
621
621
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -631,7 +631,7 @@ public void testFilterPushDownMultiColumnsWithItem() throws Exception {
631
631
+ "WHERE\n "
632
632
+ " (row_key >= 'b5' OR row_key <= 'a2') AND (t.f.c1 >= '1' OR t.f.c1 is null)" ;
633
633
634
- final String [] expectedPlan = {".*startRow=, stopRow=, filter=FilterList OR.*GREATER_OR_EQUAL, b5.*LESS_OR_EQUAL, a2.*" };
634
+ final String [] expectedPlan = {".*startRow=\" \" , stopRow=\" \" , filter=\" FilterList OR.*GREATER_OR_EQUAL, b5.*LESS_OR_EQUAL, a2.*\" " };
635
635
final String [] excludedPlan ={};
636
636
final String sqlHBase = canonizeHBaseSQL (sql );
637
637
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -649,7 +649,7 @@ public void testFilterPushDownConvertExpression() throws Exception {
649
649
650
650
runHBaseSQLVerifyCount (sql , 4 );
651
651
652
- final String [] expectedPlan = {".*startRow=b4\\ \\ x00, stopRow=, .*" };
652
+ final String [] expectedPlan = {".*startRow=\" b4\\ \\ x00\" , stopRow=\" \" .*" };
653
653
final String [] excludedPlan ={};
654
654
final String sqlHBase = canonizeHBaseSQL (sql );
655
655
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -667,7 +667,7 @@ public void testFilterPushDownConvertExpressionWithItem() throws Exception {
667
667
668
668
runHBaseSQLVerifyCount (sql , 2 );
669
669
670
- final String [] expectedPlan = {".*startRow=b4\\ \\ x00, stopRow=, .*" };
670
+ final String [] expectedPlan = {".*startRow=\" b4\\ \\ x00\" , stopRow=\" \" .*" };
671
671
final String [] excludedPlan ={};
672
672
final String sqlHBase = canonizeHBaseSQL (sql );
673
673
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -698,7 +698,7 @@ public void testFilterPushDownRowKeyLessThanOrEqualTo() throws Exception {
698
698
699
699
runHBaseSQLVerifyCount (sql , 4 );
700
700
701
- final String [] expectedPlan = {".*startRow=, stopRow=b4\\ \\ x00, filter=null .*" };
701
+ final String [] expectedPlan = {".*startRow=\" \" , stopRow=\" b4\\ \\ x00\" .*" };
702
702
final String [] excludedPlan ={};
703
703
final String sqlHBase = canonizeHBaseSQL (sql );
704
704
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -716,7 +716,7 @@ public void testFilterPushDownRowKeyLessThanOrEqualToWithItem() throws Exception
716
716
717
717
runHBaseSQLVerifyCount (sql , 4 );
718
718
719
- final String [] expectedPlan = {".*startRow=, stopRow=b4\\ \\ x00, filter=null .*" };
719
+ final String [] expectedPlan = {".*startRow=\" \" , stopRow=\" b4\\ \\ x00\" .*" };
720
720
final String [] excludedPlan ={};
721
721
final String sqlHBase = canonizeHBaseSQL (sql );
722
722
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -734,7 +734,7 @@ public void testFilterPushDownOrRowKeyEqual() throws Exception {
734
734
735
735
runHBaseSQLVerifyCount (sql , 2 );
736
736
737
- final String [] expectedPlan = {".*startRow=a2 , stopRow=b4\\ \\ x00, filter=FilterList OR \\ (2/2\\ ): \\ [RowFilter \\ (EQUAL, b4\\ ), RowFilter \\ (EQUAL, a2\\ ).*" };
737
+ final String [] expectedPlan = {".*startRow=\" a2 \" , stopRow=\" b4\\ \\ x00\" , filter=\" FilterList OR \\ (2/2\\ ): \\ [RowFilter \\ (EQUAL, b4\\ ), RowFilter \\ (EQUAL, a2\\ ).*\" " };
738
738
final String [] excludedPlan ={};
739
739
final String sqlHBase = canonizeHBaseSQL (sql );
740
740
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -753,7 +753,7 @@ public void testFilterPushDownOrRowKeyInPred() throws Exception {
753
753
754
754
runHBaseSQLVerifyCount (sql , 2 );
755
755
756
- final String [] expectedPlan = {".*startRow=a2 , stopRow=b4\\ \\ x00, filter=FilterList OR \\ (2/2\\ ): \\ [RowFilter \\ (EQUAL, b4\\ ), RowFilter \\ (EQUAL, a2\\ ).*" };
756
+ final String [] expectedPlan = {".*startRow=\" a2 \" , stopRow=\" b4\\ \\ x00\" , filter=\" FilterList OR \\ (2/2\\ ): \\ [RowFilter \\ (EQUAL, b4\\ ), RowFilter \\ (EQUAL, a2\\ ).*\" " };
757
757
final String [] excludedPlan ={};
758
758
final String sqlHBase = canonizeHBaseSQL (sql );
759
759
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -772,7 +772,7 @@ public void testFilterPushDownOrRowKeyEqualRangePred() throws Exception {
772
772
773
773
runHBaseSQLVerifyCount (sql , 3 );
774
774
775
- final String [] expectedPlan = {".*startRow=a2 , stopRow=b6\\ \\ x00, filter=FilterList OR \\ (2/2\\ ): \\ [RowFilter \\ (EQUAL, a2\\ ), FilterList AND \\ (2/2\\ ): \\ [RowFilter \\ (GREATER_OR_EQUAL, b5\\ ), RowFilter \\ (LESS_OR_EQUAL, b6.*" };
775
+ final String [] expectedPlan = {".*startRow=\" a2 \" , stopRow=\" b6\\ \\ x00\" , filter=\" FilterList OR \\ (2/2\\ ): \\ [RowFilter \\ (EQUAL, a2\\ ), FilterList AND \\ (2/2\\ ): \\ [RowFilter \\ (GREATER_OR_EQUAL, b5\\ ), RowFilter \\ (LESS_OR_EQUAL, b6.*\" " };
776
776
final String [] excludedPlan ={};
777
777
final String sqlHBase = canonizeHBaseSQL (sql );
778
778
PlanTestBase .testPlanMatchingPatterns (sqlHBase , expectedPlan , excludedPlan );
@@ -808,9 +808,9 @@ public void testConvertFromPushDownWithView() throws Exception {
808
808
809
809
String query = "select d from dfs.tmp.pd_view where d > date '2015-06-13' and d < DATE '2015-06-18'" ;
810
810
String [] expectedPlan = {
811
- "startRow=\\ \\ x00\\ \\ x00\\ \\ x01M\\ \\ xEF\\ ]\\ \\ xA0\\ \\ x00, " +
812
- "stopRow=\\ \\ x00\\ \\ x00\\ \\ x01N\\ \\ x03\\ \\ xF7\\ \\ x10\\ \\ x00, " +
813
- "filter=null" };
811
+ "startRow=\" \\ \\ x00\\ \\ x00\\ \\ x01M\\ \\ xEF\\ ]\\ \\ xA0\\ \\ x00\" , " +
812
+ "stopRow=\" \\ \\ x00\\ \\ x00\\ \\ x01N\\ \\ x03\\ \\ xF7\\ \\ x10\\ \\ x00\" "
813
+ };
814
814
String [] excludedPlan ={"Filter\\ (" };
815
815
PlanTestBase .testPlanMatchingPatterns (query , expectedPlan , excludedPlan );
816
816
0 commit comments