You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/07/31 21:20:29 UTC

[incubator-streampipes] 03/06: [hotfix] Extend data explorer query builder

This is an automated email from the ASF dual-hosted git repository.

riemer pushed a commit to branch STREAMPIPES-545
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit eae8d4e8bb3e6e6b0a6071996d3f499fca622432
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Sun Jul 31 08:45:49 2022 +0200

    [hotfix] Extend data explorer query builder
---
 .../apache/streampipes/dataexplorer/sdk/DataLakeQueryBuilder.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/sdk/DataLakeQueryBuilder.java b/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/sdk/DataLakeQueryBuilder.java
index bff07c4dd..2dfacdeb9 100644
--- a/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/sdk/DataLakeQueryBuilder.java
+++ b/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/sdk/DataLakeQueryBuilder.java
@@ -82,7 +82,13 @@ public class DataLakeQueryBuilder {
 
 
   public DataLakeQueryBuilder withEndTime(long endTime) {
-    this.whereClauses.add(new SimpleClause("time", "<=", endTime * 1000000));
+    return withEndTime(endTime, true);
+  }
+
+  public DataLakeQueryBuilder withEndTime(long endTime,
+                                          boolean includeEndTime) {
+    String operator = includeEndTime ? "<=" : "<";
+    this.whereClauses.add(new SimpleClause("time", operator, endTime * 1000000));
     return this;
   }