-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to pass step length in Loki connector. #24862
base: master
Are you sure you want to change the base?
Conversation
@@ -56,7 +56,7 @@ | |||
<dependency> | |||
<groupId>io.github.jeschkies</groupId> | |||
<artifactId>loki-client</artifactId> | |||
<version>0.0.2</version> | |||
<version>0.0.3</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate a commit.
@@ -22,7 +22,7 @@ | |||
|
|||
import static java.util.Objects.requireNonNull; | |||
|
|||
public record LokiTableHandle(String query, Instant start, Instant end, List<ColumnHandle> columnHandles) | |||
public record LokiTableHandle(String query, Instant start, Instant end, Long step, List<ColumnHandle> columnHandles) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change Long
to int
.
Long step = (Long) ((ScalarArgument) arguments.get("STEP")).getValue(); | ||
if (step == null) { | ||
step = 0L; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if we specify a negative value in step argument? Please add a test.
"Allow to pass step length in Loki connector." https://trino.io/development/process.html#pull-request-and-commit-guidelines-
|
Description
The Loki API allows to pass the step length in seconds. This change updates the client and adds an optional
STEP
parameter to the query range table function.This allows us to simplify the integration test as well.
Fixes #24861
Release notes