Skip to content

Commit 01c40e0

Browse files
committed
Fixed failing test cases
1 parent 04d6d92 commit 01c40e0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

document-store/src/test/java/org/hypertrace/core/documentstore/postgres/query/v1/parser/filter/PostgresInParserSelectorTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.hypertrace.core.documentstore.expression.impl.ConstantExpression;
1111
import org.hypertrace.core.documentstore.expression.impl.FunctionExpression;
1212
import org.hypertrace.core.documentstore.expression.impl.IdentifierExpression;
13+
import org.hypertrace.core.documentstore.expression.impl.JsonFieldType;
1314
import org.hypertrace.core.documentstore.expression.impl.JsonIdentifierExpression;
1415
import org.hypertrace.core.documentstore.expression.operators.AggregationOperator;
1516
import org.hypertrace.core.documentstore.expression.operators.FunctionOperator;
@@ -40,10 +41,11 @@ void testVisitArrayIdentifierExpression_nestedCollection() {
4041
@Test
4142
void testVisitJsonIdentifierExpression() {
4243
PostgresInParserSelector selector = new PostgresInParserSelector(true);
43-
JsonIdentifierExpression expr = JsonIdentifierExpression.of("customAttr", "field");
44+
JsonIdentifierExpression expr =
45+
JsonIdentifierExpression.of("customAttr", JsonFieldType.STRING, "field");
4446
PostgresInRelationalFilterParserInterface result = selector.visit(expr);
4547
assertNotNull(result);
46-
assertInstanceOf(PostgresInRelationalFilterParser.class, result);
48+
assertInstanceOf(PostgresInRelationalFilterParserJsonPrimitive.class, result);
4749
}
4850

4951
@Test

document-store/src/test/java/org/hypertrace/core/documentstore/postgres/query/v1/parser/filter/PostgresNotInParserSelectorTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.hypertrace.core.documentstore.expression.impl.ConstantExpression;
1111
import org.hypertrace.core.documentstore.expression.impl.FunctionExpression;
1212
import org.hypertrace.core.documentstore.expression.impl.IdentifierExpression;
13+
import org.hypertrace.core.documentstore.expression.impl.JsonFieldType;
1314
import org.hypertrace.core.documentstore.expression.impl.JsonIdentifierExpression;
1415
import org.hypertrace.core.documentstore.expression.operators.AggregationOperator;
1516
import org.hypertrace.core.documentstore.expression.operators.FunctionOperator;
@@ -40,10 +41,11 @@ void testVisitArrayIdentifierExpression_nestedCollection() {
4041
@Test
4142
void testVisitJsonIdentifierExpression() {
4243
PostgresNotInParserSelector selector = new PostgresNotInParserSelector(true);
43-
JsonIdentifierExpression expr = JsonIdentifierExpression.of("customAttr", "field");
44+
JsonIdentifierExpression expr =
45+
JsonIdentifierExpression.of("customAttr", JsonFieldType.STRING, "field");
4446
PostgresInRelationalFilterParserInterface result = selector.visit(expr);
4547
assertNotNull(result);
46-
assertInstanceOf(PostgresInRelationalFilterParser.class, result);
48+
assertInstanceOf(PostgresInRelationalFilterParserJsonPrimitive.class, result);
4749
}
4850

4951
@Test

0 commit comments

Comments
 (0)