Skip to content

Commit 5775ef3

Browse files
authored
chore(plugin-redis): Upgrade redis.clients:jedis to 7.0.0 (#26412)
## Description Upgrade redis.clients:jedis to 7.0.0 ## Motivation and Context Using a more recent version helps avoid potential vulnerabilities and ensures we aren't relying on outdated or unsupported code. ## Impact <!---Describe any public API or user-facing feature change or any performance impact--> ## Test Plan <!---Please fill in how you tested your change--> ## Contributor checklist - [ ] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [ ] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [ ] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [ ] Adequate tests were added if applicable. - [ ] CI passed. - [ ] If adding new dependencies, verified they have an [OpenSSF Scorecard](https://securityscorecards.dev/#the-checks) score of 5.0 or higher (or obtained explicit TSC approval for lower scores). ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == NO RELEASE NOTE == ```
1 parent f34aeda commit 5775ef3

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2341,7 +2341,7 @@
23412341
<dependency>
23422342
<groupId>redis.clients</groupId>
23432343
<artifactId>jedis</artifactId>
2344-
<version>3.8.0</version>
2344+
<version>7.0.0</version>
23452345
</dependency>
23462346

23472347
<dependency>

presto-redis/src/main/java/com/facebook/presto/redis/RedisRecordCursor.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,23 @@
2323
import io.airlift.slice.Slice;
2424
import redis.clients.jedis.Jedis;
2525
import redis.clients.jedis.JedisPool;
26-
import redis.clients.jedis.ScanParams;
27-
import redis.clients.jedis.ScanResult;
26+
import redis.clients.jedis.params.ScanParams;
27+
import redis.clients.jedis.resps.ScanResult;
2828

2929
import java.nio.charset.StandardCharsets;
3030
import java.util.HashMap;
3131
import java.util.Iterator;
3232
import java.util.List;
3333
import java.util.Map;
3434
import java.util.Optional;
35-
import java.util.Set;
3635
import java.util.concurrent.atomic.AtomicBoolean;
3736

3837
import static com.facebook.presto.decoder.FieldValueProviders.booleanValueProvider;
3938
import static com.facebook.presto.decoder.FieldValueProviders.bytesValueProvider;
4039
import static com.facebook.presto.decoder.FieldValueProviders.longValueProvider;
4140
import static com.google.common.base.Preconditions.checkArgument;
4241
import static java.lang.String.format;
43-
import static redis.clients.jedis.ScanParams.SCAN_POINTER_START;
42+
import static redis.clients.jedis.params.ScanParams.SCAN_POINTER_START;
4443

4544
public class RedisRecordCursor
4645
implements RecordCursor
@@ -310,7 +309,7 @@ private boolean fetchKeys()
310309
}
311310
break;
312311
case ZSET:
313-
Set<String> keys = jedis.zrange(split.getKeyName(), split.getStart(), split.getEnd());
312+
List<String> keys = jedis.zrange(split.getKeyName(), split.getStart(), split.getEnd());
314313
keysIterator = keys.iterator();
315314
break;
316315
default:

0 commit comments

Comments
 (0)