Skip to content

Commit 5bd4de7

Browse files
committed
WIP
1 parent 193c232 commit 5bd4de7

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.hypertrace.core.documentstore.expression.impl.AggregateExpression;
77
import org.hypertrace.core.documentstore.expression.impl.AliasedIdentifierExpression;
88
import org.hypertrace.core.documentstore.expression.impl.ArrayIdentifierExpression;
9-
import org.hypertrace.core.documentstore.expression.impl.ArrayType;
109
import org.hypertrace.core.documentstore.expression.impl.ConstantExpression;
1110
import org.hypertrace.core.documentstore.expression.impl.ConstantExpression.DocumentConstantExpression;
1211
import org.hypertrace.core.documentstore.expression.impl.FunctionExpression;
@@ -34,7 +33,7 @@ void testVisitJsonIdentifierExpression() {
3433
@Test
3534
void testVisitArrayIdentifierExpression() {
3635
PostgresArrayEqualityParserSelector selector = new PostgresArrayEqualityParserSelector();
37-
ArrayIdentifierExpression expr = ArrayIdentifierExpression.of("tags", ArrayType.TEXT);
36+
ArrayIdentifierExpression expr = ArrayIdentifierExpression.ofStrings("tags");
3837

3938
Object result = selector.visit(expr);
4039

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import java.util.List;
1111
import org.hypertrace.core.documentstore.expression.impl.ArrayIdentifierExpression;
12-
import org.hypertrace.core.documentstore.expression.impl.ArrayType;
1312
import org.hypertrace.core.documentstore.expression.impl.ConstantExpression;
1413
import org.hypertrace.core.documentstore.expression.impl.RelationalExpression;
1514
import org.hypertrace.core.documentstore.postgres.Params;
@@ -45,7 +44,7 @@ void setUp() {
4544

4645
@Test
4746
void testParseNullRhs() {
48-
ArrayIdentifierExpression lhs = ArrayIdentifierExpression.of("tags", ArrayType.TEXT);
47+
ArrayIdentifierExpression lhs = ArrayIdentifierExpression.ofStrings("tags");
4948
ConstantExpression rhs = ConstantExpression.of("ignored");
5049
RelationalExpression expression = RelationalExpression.of(lhs, EQ, rhs);
5150

@@ -68,7 +67,7 @@ void testParseNullRhs() {
6867

6968
@Test
7069
void testParseScalarRhsEq() {
71-
ArrayIdentifierExpression lhs = ArrayIdentifierExpression.of("tags", ArrayType.TEXT);
70+
ArrayIdentifierExpression lhs = ArrayIdentifierExpression.ofStrings("tags");
7271
ConstantExpression rhs = ConstantExpression.of("hygiene");
7372
RelationalExpression expression = RelationalExpression.of(lhs, EQ, rhs);
7473

@@ -83,7 +82,7 @@ void testParseScalarRhsEq() {
8382

8483
@Test
8584
void testParseIterableRhsEq() {
86-
ArrayIdentifierExpression lhs = ArrayIdentifierExpression.of("tags", ArrayType.TEXT);
85+
ArrayIdentifierExpression lhs = ArrayIdentifierExpression.ofStrings("tags");
8786
ConstantExpression rhs = ConstantExpression.ofStrings(List.of("hygiene", "family-pack"));
8887
RelationalExpression expression = RelationalExpression.of(lhs, EQ, rhs);
8988

@@ -99,7 +98,7 @@ void testParseIterableRhsEq() {
9998

10099
@Test
101100
void testParseIterableRhsNeq() {
102-
ArrayIdentifierExpression lhs = ArrayIdentifierExpression.of("tags", ArrayType.TEXT);
101+
ArrayIdentifierExpression lhs = ArrayIdentifierExpression.ofStrings("tags");
103102
ConstantExpression rhs = ConstantExpression.ofStrings(List.of("a", "b"));
104103
RelationalExpression expression = RelationalExpression.of(lhs, NEQ, rhs);
105104

0 commit comments

Comments
 (0)