Skip to content

Commit 05fccd7

Browse files
author
Julien Ruaux
committed
deps: Upgraded to trino 396
1 parent 3f756d9 commit 05fccd7

File tree

3 files changed

+38
-36
lines changed

3 files changed

+38
-36
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG TRINO_VERSION=395
1+
ARG TRINO_VERSION=396
22

33
FROM docker.io/library/maven:3.8.6-openjdk-18 AS builder
44
WORKDIR /root/trino-redisearch

pom.xml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.trino</groupId>
77
<artifactId>trino-root</artifactId>
8-
<version>395</version>
8+
<version>396</version>
99
</parent>
1010

1111
<groupId>com.redis</groupId>
@@ -15,7 +15,6 @@
1515
<packaging>trino-plugin</packaging>
1616

1717
<properties>
18-
<trino.version>395</trino.version>
1918
<lettucemod.version>3.1.5</lettucemod.version>
2019
<lettuce.version>6.2.0.RELEASE</lettuce.version>
2120
<testcontainers-redis.version>1.6.2</testcontainers-redis.version>
@@ -30,7 +29,7 @@
3029
<dependency>
3130
<groupId>io.trino</groupId>
3231
<artifactId>trino-plugin-toolkit</artifactId>
33-
<version>${trino.version}</version>
32+
<version>${project.parent.version}</version>
3433
</dependency>
3534

3635
<dependency>
@@ -99,7 +98,7 @@
9998
<dependency>
10099
<groupId>io.trino</groupId>
101100
<artifactId>trino-matching</artifactId>
102-
<version>${trino.version}</version>
101+
<version>${project.parent.version}</version>
103102
<scope>runtime</scope>
104103
</dependency>
105104

@@ -114,7 +113,7 @@
114113
<dependency>
115114
<groupId>io.trino</groupId>
116115
<artifactId>trino-spi</artifactId>
117-
<version>${trino.version}</version>
116+
<version>${project.parent.version}</version>
118117
<scope>provided</scope>
119118
</dependency>
120119

@@ -142,42 +141,42 @@
142141
<dependency>
143142
<groupId>io.trino</groupId>
144143
<artifactId>trino-array</artifactId>
145-
<version>${trino.version}</version>
144+
<version>${project.parent.version}</version>
146145
<scope>test</scope>
147146
</dependency>
148147

149148
<dependency>
150149
<groupId>io.trino</groupId>
151150
<artifactId>trino-client</artifactId>
152-
<version>${trino.version}</version>
151+
<version>${project.parent.version}</version>
153152
<scope>test</scope>
154153
</dependency>
155154

156155
<dependency>
157156
<groupId>io.trino</groupId>
158157
<artifactId>trino-collect</artifactId>
159-
<version>${trino.version}</version>
158+
<version>${project.parent.version}</version>
160159
<scope>test</scope>
161160
</dependency>
162161

163162
<dependency>
164163
<groupId>io.trino</groupId>
165164
<artifactId>trino-geospatial-toolkit</artifactId>
166-
<version>${trino.version}</version>
165+
<version>${project.parent.version}</version>
167166
<scope>test</scope>
168167
</dependency>
169168

170169
<dependency>
171170
<groupId>io.trino</groupId>
172171
<artifactId>trino-jmx</artifactId>
173-
<version>${trino.version}</version>
172+
<version>${project.parent.version}</version>
174173
<scope>test</scope>
175174
</dependency>
176175

177176
<dependency>
178177
<groupId>io.trino</groupId>
179178
<artifactId>trino-main</artifactId>
180-
<version>${trino.version}</version>
179+
<version>${project.parent.version}</version>
181180
<scope>test</scope>
182181

183182
<exclusions>
@@ -192,7 +191,7 @@
192191
<groupId>io.trino</groupId>
193192
<artifactId>trino-main</artifactId>
194193
<type>test-jar</type>
195-
<version>${trino.version}</version>
194+
<version>${project.parent.version}</version>
196195
<scope>test</scope>
197196

198197
<exclusions>
@@ -206,35 +205,35 @@
206205
<dependency>
207206
<groupId>io.trino</groupId>
208207
<artifactId>trino-memory-context</artifactId>
209-
<version>${trino.version}</version>
208+
<version>${project.parent.version}</version>
210209
<scope>test</scope>
211210
</dependency>
212211

213212
<dependency>
214213
<groupId>io.trino</groupId>
215214
<artifactId>trino-parser</artifactId>
216-
<version>${trino.version}</version>
215+
<version>${project.parent.version}</version>
217216
<scope>test</scope>
218217
</dependency>
219218

220219
<dependency>
221220
<groupId>io.trino</groupId>
222221
<artifactId>trino-testing</artifactId>
223-
<version>${trino.version}</version>
222+
<version>${project.parent.version}</version>
224223
<scope>test</scope>
225224
</dependency>
226225

227226
<dependency>
228227
<groupId>io.trino</groupId>
229228
<artifactId>trino-testing-services</artifactId>
230-
<version>${trino.version}</version>
229+
<version>${project.parent.version}</version>
231230
<scope>test</scope>
232231
</dependency>
233232

234233
<dependency>
235234
<groupId>io.trino</groupId>
236235
<artifactId>trino-tpch</artifactId>
237-
<version>${trino.version}</version>
236+
<version>${project.parent.version}</version>
238237
<scope>test</scope>
239238
</dependency>
240239

@@ -372,7 +371,6 @@
372371
<plugin>
373372
<groupId>org.jacoco</groupId>
374373
<artifactId>jacoco-maven-plugin</artifactId>
375-
<version>0.8.8</version>
376374
<executions>
377375
<execution>
378376
<id>prepare-agent</id>

src/main/java/com/redis/trino/RediSearchMetadata.java

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -278,25 +278,29 @@ public Optional<ConstraintApplicationResult<ConnectorTableHandle>> applyFilter(C
278278
List<ConnectorExpression> expressions = ConnectorExpressions.extractConjuncts(constraint.getExpression());
279279
List<ConnectorExpression> notHandledExpressions = new ArrayList<>();
280280
for (ConnectorExpression expression : expressions) {
281-
if (expression instanceof Call call && isSupportedLikeCall(call)) {
282-
List<ConnectorExpression> arguments = call.getArguments();
283-
String variableName = ((Variable) arguments.get(0)).getName();
284-
RediSearchColumnHandle column = (RediSearchColumnHandle) constraint.getAssignments().get(variableName);
285-
verifyNotNull(column, "No assignment for %s", variableName);
286-
String columnName = column.getName();
287-
Object pattern = ((Constant) arguments.get(1)).getValue();
288-
Optional<Slice> escape = Optional.empty();
289-
if (arguments.size() == 3) {
290-
escape = Optional.of((Slice) (((Constant) arguments.get(2)).getValue()));
291-
}
281+
if (expression instanceof Call) {
282+
Call call = (Call) expression;
283+
if (isSupportedLikeCall(call)) {
284+
List<ConnectorExpression> arguments = call.getArguments();
285+
String variableName = ((Variable) arguments.get(0)).getName();
286+
RediSearchColumnHandle column = (RediSearchColumnHandle) constraint.getAssignments()
287+
.get(variableName);
288+
verifyNotNull(column, "No assignment for %s", variableName);
289+
String columnName = column.getName();
290+
Object pattern = ((Constant) arguments.get(1)).getValue();
291+
Optional<Slice> escape = Optional.empty();
292+
if (arguments.size() == 3) {
293+
escape = Optional.of((Slice) (((Constant) arguments.get(2)).getValue()));
294+
}
292295

293-
if (!newWildcards.containsKey(columnName) && pattern instanceof Slice slice) {
294-
String wildcard = likeToWildcard(slice, escape);
295-
if (column.getFieldType() == Field.Type.TAG) {
296-
wildcard = Values.tags(wildcard).toString();
296+
if (!newWildcards.containsKey(columnName) && pattern instanceof Slice slice) {
297+
String wildcard = likeToWildcard(slice, escape);
298+
if (column.getFieldType() == Field.Type.TAG) {
299+
wildcard = Values.tags(wildcard).toString();
300+
}
301+
newWildcards.put(columnName, wildcard);
302+
continue;
297303
}
298-
newWildcards.put(columnName, wildcard);
299-
continue;
300304
}
301305
}
302306
notHandledExpressions.add(expression);

0 commit comments

Comments
 (0)