You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by od...@apache.org on 2016/10/21 22:09:51 UTC
[1/5] incubator-hawq git commit: HAWQ-1103. Draft implementation
without taking care of different charsets.
Repository: incubator-hawq
Updated Branches:
refs/heads/HAWQ-1103 [created] b2dd7de0c
HAWQ-1103. Draft implementation without taking care of different charsets.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/b318fa0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/b318fa0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/b318fa0e
Branch: refs/heads/HAWQ-1103
Commit: b318fa0e7d038084ded2bc99c6e631aa26700b21
Parents: 7f3658d
Author: Oleksandr Diachenko <od...@pivotal.io>
Authored: Thu Oct 13 16:00:03 2016 -0700
Committer: Oleksandr Diachenko <od...@pivotal.io>
Committed: Thu Oct 13 16:00:03 2016 -0700
----------------------------------------------------------------------
src/backend/access/external/pxffilters.c | 25 +++++++++++++++----------
src/include/access/pxffilters.h | 9 ++++++---
2 files changed, 21 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b318fa0e/src/backend/access/external/pxffilters.c
----------------------------------------------------------------------
diff --git a/src/backend/access/external/pxffilters.c b/src/backend/access/external/pxffilters.c
index 56aea55..ded9f9a 100644
--- a/src/backend/access/external/pxffilters.c
+++ b/src/backend/access/external/pxffilters.c
@@ -369,14 +369,18 @@ pxf_serialize_filter_list(List *expressionItems)
PxfOperatorCode o = filter->op;
if (pxfoperand_is_attr(l) && pxfoperand_is_const(r))
{
- appendStringInfo(resbuf, "%c%d%c%s",
+ appendStringInfo(resbuf, "%c%d%c%d%c%d%c%s",
PXF_ATTR_CODE, l.attnum - 1, /* Java attrs are 0-based */
- PXF_CONST_CODE, (r.conststr)->data);
+ PXF_CONST_CODE, r.consttype,
+ PXF_LENGTH_TO_READ, strlen(r.conststr->data),
+ PXF_CONST_DATA, (r.conststr)->data);
}
else if (pxfoperand_is_const(l) && pxfoperand_is_attr(r))
{
- appendStringInfo(resbuf, "%c%s%c%d",
- PXF_CONST_CODE, (l.conststr)->data,
+ appendStringInfo(resbuf, "%c%d%c%d%c%s%c%d",
+ PXF_CONST_CODE, l.consttype,
+ PXF_LENGTH_TO_READ, strlen(l.conststr->data),
+ PXF_CONST_DATA, (l.conststr)->data,
PXF_ATTR_CODE, r.attnum - 1); /* Java attrs are 0-based */
}
else
@@ -468,6 +472,7 @@ opexpr_to_pxffilter(OpExpr *expr, PxfFilterDesc *filter)
{
filter->l.opcode = PXF_ATTR_CODE;
filter->l.attnum = ((Var *) leftop)->varattno;
+ filter->l.consttype = InvalidOid;
if (filter->l.attnum <= InvalidAttrNumber)
return false; /* system attr not supported */
@@ -476,6 +481,7 @@ opexpr_to_pxffilter(OpExpr *expr, PxfFilterDesc *filter)
filter->r.conststr = makeStringInfo();
initStringInfo(filter->r.conststr);
const_to_str((Const *)rightop, filter->r.conststr);
+ filter->r.consttype = ((Const *)rightop)->consttype;
}
else if (IsA(leftop, Const) && IsA(rightop, Var))
{
@@ -484,9 +490,11 @@ opexpr_to_pxffilter(OpExpr *expr, PxfFilterDesc *filter)
filter->l.conststr = makeStringInfo();
initStringInfo(filter->l.conststr);
const_to_str((Const *)leftop, filter->l.conststr);
+ filter->l.consttype = ((Const *)leftop)->consttype;
filter->r.opcode = PXF_ATTR_CODE;
filter->r.attnum = ((Var *) rightop)->varattno;
+ filter->r.consttype = InvalidOid;
if (filter->r.attnum <= InvalidAttrNumber)
return false; /* system attr not supported */
}
@@ -632,9 +640,6 @@ const_to_str(Const *constval, StringInfo buf)
case FLOAT4OID:
case FLOAT8OID:
case NUMERICOID:
- appendStringInfo(buf, "%s", extval);
- break;
-
case TEXTOID:
case VARCHAROID:
case BPCHAROID:
@@ -642,14 +647,14 @@ const_to_str(Const *constval, StringInfo buf)
case BYTEAOID:
case DATEOID:
case TIMESTAMPOID:
- appendStringInfo(buf, "\\\"%s\\\"", extval);
+ appendStringInfo(buf, "%s", extval);
break;
case BOOLOID:
if (strcmp(extval, "t") == 0)
- appendStringInfo(buf, "\"true\"");
+ appendStringInfo(buf, "true");
else
- appendStringInfo(buf, "\"false\"");
+ appendStringInfo(buf, "false");
break;
default:
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b318fa0e/src/include/access/pxffilters.h
----------------------------------------------------------------------
diff --git a/src/include/access/pxffilters.h b/src/include/access/pxffilters.h
index 894337b..5f5ae4e 100644
--- a/src/include/access/pxffilters.h
+++ b/src/include/access/pxffilters.h
@@ -53,9 +53,11 @@ typedef enum PxfOperatorCode
* by a code that will describe the operator type in the final serialized
* string that gets pushed down.
*/
-#define PXF_ATTR_CODE 'a'
-#define PXF_CONST_CODE 'c'
-#define PXF_OPERATOR_CODE 'o'
+#define PXF_ATTR_CODE 'a'
+#define PXF_CONST_CODE 'c'
+#define PXF_LENGTH_TO_READ 's'
+#define PXF_CONST_DATA 'd'
+#define PXF_OPERATOR_CODE 'o'
#define PXF_LOGICAL_OPERATOR_CODE 'l'
/*
@@ -68,6 +70,7 @@ typedef struct PxfOperand
char opcode; /* PXF_ATTR_CODE or PXF_CONST_CODE*/
AttrNumber attnum; /* used when opcode is PXF_ATTR_CODE */
StringInfo conststr; /* used when opcode is PXF_CONST_CODE */
+ Oid consttype; /* used when opcode is PXF_CONST_CODE */
} PxfOperand;
[3/5] incubator-hawq git commit: HAWQ-1103. Added test cases with
string containing a quote.
Posted by od...@apache.org.
HAWQ-1103. Added test cases with string containing a quote.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/2497b6f3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/2497b6f3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/2497b6f3
Branch: refs/heads/HAWQ-1103
Commit: 2497b6f327944e1fbdc5434dddacab0fcacfa7f9
Parents: d9f77da
Author: Oleksandr Diachenko <od...@pivotal.io>
Authored: Fri Oct 14 11:45:02 2016 -0700
Committer: Oleksandr Diachenko <od...@pivotal.io>
Committed: Fri Oct 14 11:45:02 2016 -0700
----------------------------------------------------------------------
src/backend/access/external/pxffilters.c | 4 ++--
src/backend/access/external/test/pxffilters_test.c | 7 +++++--
src/include/access/pxffilters.h | 2 +-
3 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2497b6f3/src/backend/access/external/pxffilters.c
----------------------------------------------------------------------
diff --git a/src/backend/access/external/pxffilters.c b/src/backend/access/external/pxffilters.c
index ded9f9a..ef7b16f 100644
--- a/src/backend/access/external/pxffilters.c
+++ b/src/backend/access/external/pxffilters.c
@@ -372,14 +372,14 @@ pxf_serialize_filter_list(List *expressionItems)
appendStringInfo(resbuf, "%c%d%c%d%c%d%c%s",
PXF_ATTR_CODE, l.attnum - 1, /* Java attrs are 0-based */
PXF_CONST_CODE, r.consttype,
- PXF_LENGTH_TO_READ, strlen(r.conststr->data),
+ PXF_SIZE_BYTES, strlen(r.conststr->data),
PXF_CONST_DATA, (r.conststr)->data);
}
else if (pxfoperand_is_const(l) && pxfoperand_is_attr(r))
{
appendStringInfo(resbuf, "%c%d%c%d%c%s%c%d",
PXF_CONST_CODE, l.consttype,
- PXF_LENGTH_TO_READ, strlen(l.conststr->data),
+ PXF_SIZE_BYTES, strlen(l.conststr->data),
PXF_CONST_DATA, (l.conststr)->data,
PXF_ATTR_CODE, r.attnum - 1); /* Java attrs are 0-based */
}
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2497b6f3/src/backend/access/external/test/pxffilters_test.c
----------------------------------------------------------------------
diff --git a/src/backend/access/external/test/pxffilters_test.c b/src/backend/access/external/test/pxffilters_test.c
index 6db7ae7..3679587 100644
--- a/src/backend/access/external/test/pxffilters_test.c
+++ b/src/backend/access/external/test/pxffilters_test.c
@@ -517,20 +517,23 @@ test__pxf_serialize_filter_list__manyFilters(void **state)
ExpressionItem* expressionItem2 = build_expression_item(2, TEXTOID, "George Orwell", TEXTOID, TextEqualOperator);
ExpressionItem* expressionItem3 = build_expression_item(3, TEXTOID, "Winston", TEXTOID, TextEqualOperator);
ExpressionItem* expressionItem4 = build_expression_item(4, TEXTOID, "Eric-%", TEXTOID, 1209);
+ ExpressionItem* expressionItem5 = build_expression_item(5, TEXTOID, "\"Ugly\" string with quotes", TEXTOID, TextEqualOperator);
expressionItems = lappend(expressionItems, expressionItem1);
expressionItems = lappend(expressionItems, expressionItem2);
expressionItems = lappend(expressionItems, expressionItem3);
expressionItems = lappend(expressionItems, expressionItem4);
+ expressionItems = lappend(expressionItems, expressionItem5);
result = pxf_serialize_filter_list(expressionItems);
- assert_string_equal(result, "a0c25s4d1984o5a1c25s13dGeorge Orwello5a2c25s7dWinstono5a3c25s6dEric-%o7");
+ assert_string_equal(result, "a0c25s4d1984o5a1c25s13dGeorge Orwello5a2c25s7dWinstono5a3c25s6dEric-%o7a4c25s25d\"Ugly\" string with quoteso5");
pfree(result);
+ int trivialExpressionItems = expressionItems->length;
enrich_trivial_expression(expressionItems);
- assert_int_equal(expressionItems->length, 7);
+ assert_int_equal(expressionItems->length, 2*trivialExpressionItems - 1);
pxf_free_expression_items_list(expressionItems, true);
expressionItems = NIL;
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2497b6f3/src/include/access/pxffilters.h
----------------------------------------------------------------------
diff --git a/src/include/access/pxffilters.h b/src/include/access/pxffilters.h
index 5f5ae4e..00c77d3 100644
--- a/src/include/access/pxffilters.h
+++ b/src/include/access/pxffilters.h
@@ -55,7 +55,7 @@ typedef enum PxfOperatorCode
*/
#define PXF_ATTR_CODE 'a'
#define PXF_CONST_CODE 'c'
-#define PXF_LENGTH_TO_READ 's'
+#define PXF_SIZE_BYTES 's'
#define PXF_CONST_DATA 'd'
#define PXF_OPERATOR_CODE 'o'
#define PXF_LOGICAL_OPERATOR_CODE 'l'
[4/5] incubator-hawq git commit: HAWQ-1103. Fixed warnings.
Posted by od...@apache.org.
HAWQ-1103. Fixed warnings.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/35442228
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/35442228
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/35442228
Branch: refs/heads/HAWQ-1103
Commit: 354422287af2cb1af0e9465821d8ec9f6062fa10
Parents: 2497b6f
Author: Oleksandr Diachenko <od...@pivotal.io>
Authored: Tue Oct 18 14:44:49 2016 -0700
Committer: Oleksandr Diachenko <od...@pivotal.io>
Committed: Tue Oct 18 14:44:49 2016 -0700
----------------------------------------------------------------------
src/backend/access/external/pxffilters.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/35442228/src/backend/access/external/pxffilters.c
----------------------------------------------------------------------
diff --git a/src/backend/access/external/pxffilters.c b/src/backend/access/external/pxffilters.c
index ef7b16f..0d13074 100644
--- a/src/backend/access/external/pxffilters.c
+++ b/src/backend/access/external/pxffilters.c
@@ -31,7 +31,7 @@
#include "utils/guc.h"
#include "utils/lsyscache.h"
-static List* pxf_make_expression_items_list(List *quals, Node *parent, bool *logicalOpsNum);
+static List* pxf_make_expression_items_list(List *quals, Node *parent, int *logicalOpsNum);
static void pxf_free_filter(PxfFilterDesc* filter);
static char* pxf_serialize_filter_list(List *filters);
static bool opexpr_to_pxffilter(OpExpr *expr, PxfFilterDesc *filter);
@@ -193,7 +193,6 @@ Oid pxf_supported_types[] =
static void
pxf_free_expression_items_list(List *expressionItems, bool freeBoolExprNodes)
{
- ListCell *lc = NULL;
ExpressionItem *expressionItem = NULL;
int previousLength;
@@ -228,7 +227,7 @@ pxf_free_expression_items_list(List *expressionItems, bool freeBoolExprNodes)
*
*/
static List *
-pxf_make_expression_items_list(List *quals, Node *parent, bool *logicalOpsNum)
+pxf_make_expression_items_list(List *quals, Node *parent, int *logicalOpsNum)
{
ExpressionItem *expressionItem = NULL;
List *result = NIL;
@@ -369,7 +368,7 @@ pxf_serialize_filter_list(List *expressionItems)
PxfOperatorCode o = filter->op;
if (pxfoperand_is_attr(l) && pxfoperand_is_const(r))
{
- appendStringInfo(resbuf, "%c%d%c%d%c%d%c%s",
+ appendStringInfo(resbuf, "%c%d%c%d%c%lu%c%s",
PXF_ATTR_CODE, l.attnum - 1, /* Java attrs are 0-based */
PXF_CONST_CODE, r.consttype,
PXF_SIZE_BYTES, strlen(r.conststr->data),
@@ -377,7 +376,7 @@ pxf_serialize_filter_list(List *expressionItems)
}
else if (pxfoperand_is_const(l) && pxfoperand_is_attr(r))
{
- appendStringInfo(resbuf, "%c%d%c%d%c%s%c%d",
+ appendStringInfo(resbuf, "%c%d%c%lu%c%s%c%d",
PXF_CONST_CODE, l.consttype,
PXF_SIZE_BYTES, strlen(l.conststr->data),
PXF_CONST_DATA, (l.conststr)->data,
@@ -410,6 +409,10 @@ pxf_serialize_filter_list(List *expressionItems)
appendStringInfo(resbuf, "%c%d", PXF_LOGICAL_OPERATOR_CODE, boolType);
break;
}
+ default:
+ {
+ elog(DEBUG5, "Skipping tag: %d", tag);
+ }
}
}
@@ -726,7 +729,7 @@ void enrich_trivial_expression(List *expressionItems) {
andExpr->boolop = AND_EXPR;
- andExpressionItem->node = andExpr;
+ andExpressionItem->node = (Node *) andExpr;
andExpressionItem->parent = NULL;
andExpressionItem->processed = false;
[5/5] incubator-hawq git commit: HAWQ-1103. Added comments and test
case for empty string.
Posted by od...@apache.org.
HAWQ-1103. Added comments and test case for empty string.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/b2dd7de0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/b2dd7de0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/b2dd7de0
Branch: refs/heads/HAWQ-1103
Commit: b2dd7de0c332922f647309f58e6e4a3630d33418
Parents: 3544222
Author: Oleksandr Diachenko <od...@pivotal.io>
Authored: Fri Oct 21 15:09:39 2016 -0700
Committer: Oleksandr Diachenko <od...@pivotal.io>
Committed: Fri Oct 21 15:09:39 2016 -0700
----------------------------------------------------------------------
src/backend/access/external/pxffilters.c | 22 +++++++++++++++++++-
.../access/external/test/pxffilters_test.c | 4 +++-
2 files changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b2dd7de0/src/backend/access/external/pxffilters.c
----------------------------------------------------------------------
diff --git a/src/backend/access/external/pxffilters.c b/src/backend/access/external/pxffilters.c
index 0d13074..f06b07f 100644
--- a/src/backend/access/external/pxffilters.c
+++ b/src/backend/access/external/pxffilters.c
@@ -329,7 +329,27 @@ pxf_free_filter(PxfFilterDesc* filter)
*
* Yields the following serialized string:
*
- * a0c1o2a0c5o1o7a2c"third"o5o7
+ * a0c23s1d1o2a1c23s1d5o1a2c25s5dthirdo5l0l0
+ *
+ * Where:
+ *
+ * a0 - first column of table
+ * c23 - scalar constant with type oid 23(INT4)
+ * s1 - size of constant in bytes
+ * d1 - serialized constant value
+ * o2 - greater than operation
+ * a1 - second column of table
+ * c23 - scalar constant with type oid 23(INT4)
+ * s1 - size of constant in bytes
+ * d5 - serialized constant value
+ * o1 - less than operation
+ * a2 - third column of table
+ * c25 - scalar constant with type oid 25(TEXT)
+ * s5 - size of constant in bytes
+ * dthird - serialized constant value
+ * o5 - equals operation
+ * l0 - AND operator
+ * l0 - AND operator
*
*/
static char *
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b2dd7de0/src/backend/access/external/test/pxffilters_test.c
----------------------------------------------------------------------
diff --git a/src/backend/access/external/test/pxffilters_test.c b/src/backend/access/external/test/pxffilters_test.c
index 3679587..fa1db94 100644
--- a/src/backend/access/external/test/pxffilters_test.c
+++ b/src/backend/access/external/test/pxffilters_test.c
@@ -518,6 +518,7 @@ test__pxf_serialize_filter_list__manyFilters(void **state)
ExpressionItem* expressionItem3 = build_expression_item(3, TEXTOID, "Winston", TEXTOID, TextEqualOperator);
ExpressionItem* expressionItem4 = build_expression_item(4, TEXTOID, "Eric-%", TEXTOID, 1209);
ExpressionItem* expressionItem5 = build_expression_item(5, TEXTOID, "\"Ugly\" string with quotes", TEXTOID, TextEqualOperator);
+ ExpressionItem* expressionItem6 = build_expression_item(6, TEXTOID, "", TEXTOID, TextEqualOperator);
expressionItems = lappend(expressionItems, expressionItem1);
@@ -525,9 +526,10 @@ test__pxf_serialize_filter_list__manyFilters(void **state)
expressionItems = lappend(expressionItems, expressionItem3);
expressionItems = lappend(expressionItems, expressionItem4);
expressionItems = lappend(expressionItems, expressionItem5);
+ expressionItems = lappend(expressionItems, expressionItem6);
result = pxf_serialize_filter_list(expressionItems);
- assert_string_equal(result, "a0c25s4d1984o5a1c25s13dGeorge Orwello5a2c25s7dWinstono5a3c25s6dEric-%o7a4c25s25d\"Ugly\" string with quoteso5");
+ assert_string_equal(result, "a0c25s4d1984o5a1c25s13dGeorge Orwello5a2c25s7dWinstono5a3c25s6dEric-%o7a4c25s25d\"Ugly\" string with quoteso5a5c25s0do5");
pfree(result);
int trivialExpressionItems = expressionItems->length;
[2/5] incubator-hawq git commit: HAWQ-1103. Updated unit-tests.
Posted by od...@apache.org.
HAWQ-1103. Updated unit-tests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/d9f77da1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/d9f77da1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/d9f77da1
Branch: refs/heads/HAWQ-1103
Commit: d9f77da1db31e260092fbce603686f92540848f3
Parents: b318fa0
Author: Oleksandr Diachenko <od...@pivotal.io>
Authored: Thu Oct 13 16:45:33 2016 -0700
Committer: Oleksandr Diachenko <od...@pivotal.io>
Committed: Thu Oct 13 16:45:33 2016 -0700
----------------------------------------------------------------------
.../access/external/test/pxffilters_test.c | 26 ++++++++++----------
1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/d9f77da1/src/backend/access/external/test/pxffilters_test.c
----------------------------------------------------------------------
diff --git a/src/backend/access/external/test/pxffilters_test.c b/src/backend/access/external/test/pxffilters_test.c
index 76be330..6db7ae7 100644
--- a/src/backend/access/external/test/pxffilters_test.c
+++ b/src/backend/access/external/test/pxffilters_test.c
@@ -183,19 +183,19 @@ test__const_to_str__int(void **state)
void
test__const_to_str__text(void **state)
{
- verify__const_to_str(false, "that", TEXTOID, "\\\"that\\\"");
- verify__const_to_str(false, "joke", VARCHAROID, "\\\"joke\\\"");
- verify__const_to_str(false, "isn't", BPCHAROID, "\\\"isn't\\\"");
- verify__const_to_str(false, "funny", CHAROID, "\\\"funny\\\"");
- verify__const_to_str(false, "anymore", BYTEAOID, "\\\"anymore\\\"");
- verify__const_to_str(false, "iamdate", DATEOID, "\\\"iamdate\\\"");
+ verify__const_to_str(false, "that", TEXTOID, "that");
+ verify__const_to_str(false, "joke", VARCHAROID, "joke");
+ verify__const_to_str(false, "isn't", BPCHAROID, "isn't");
+ verify__const_to_str(false, "funny", CHAROID, "funny");
+ verify__const_to_str(false, "anymore", BYTEAOID, "anymore");
+ verify__const_to_str(false, "iamdate", DATEOID, "iamdate");
}
void
test__const_to_str__boolean(void **state)
{
- verify__const_to_str(false, "t", BOOLOID, "\"true\"");
- verify__const_to_str(false, "f", BOOLOID, "\"false\"");
+ verify__const_to_str(false, "t", BOOLOID, "true");
+ verify__const_to_str(false, "f", BOOLOID, "false");
}
void
@@ -499,7 +499,7 @@ void test__pxf_serialize_filter_list__oneFilter(void **state) {
expressionItems = lappend(expressionItems, filterExpressionItem);
char* result = pxf_serialize_filter_list(expressionItems);
- assert_string_equal(result, "a0c\\\"1984\\\"o5");
+ assert_string_equal(result, "a0c25s4d1984o5");
pxf_free_expression_items_list(expressionItems, true);
expressionItems = NIL;
@@ -514,9 +514,9 @@ test__pxf_serialize_filter_list__manyFilters(void **state)
List* expressionItems = NIL;
ExpressionItem* expressionItem1 = build_expression_item(1, TEXTOID, "1984", TEXTOID, TextEqualOperator);
- ExpressionItem* expressionItem2 = build_expression_item(2, TEXTOID, "\"George Orwell\"", TEXTOID, TextEqualOperator);
- ExpressionItem* expressionItem3 = build_expression_item(3, TEXTOID, "\"Winston\"", TEXTOID, TextEqualOperator);
- ExpressionItem* expressionItem4 = build_expression_item(4, TEXTOID, "\"Eric-%\"", TEXTOID, 1209);
+ ExpressionItem* expressionItem2 = build_expression_item(2, TEXTOID, "George Orwell", TEXTOID, TextEqualOperator);
+ ExpressionItem* expressionItem3 = build_expression_item(3, TEXTOID, "Winston", TEXTOID, TextEqualOperator);
+ ExpressionItem* expressionItem4 = build_expression_item(4, TEXTOID, "Eric-%", TEXTOID, 1209);
expressionItems = lappend(expressionItems, expressionItem1);
@@ -525,7 +525,7 @@ test__pxf_serialize_filter_list__manyFilters(void **state)
expressionItems = lappend(expressionItems, expressionItem4);
result = pxf_serialize_filter_list(expressionItems);
- assert_string_equal(result, "a0c\\\"1984\\\"o5a1c\\\"\"George Orwell\"\\\"o5a2c\\\"\"Winston\"\\\"o5a3c\\\"\"Eric-%\"\\\"o7");
+ assert_string_equal(result, "a0c25s4d1984o5a1c25s13dGeorge Orwello5a2c25s7dWinstono5a3c25s6dEric-%o7");
pfree(result);
enrich_trivial_expression(expressionItems);