You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2022/07/27 07:39:58 UTC

[incubator-streampipes] branch dev updated: [hotfix] Fix truncating and deleting data from data explorer

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

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


The following commit(s) were added to refs/heads/dev by this push:
     new 37988882d [hotfix] Fix truncating and deleting data from data explorer
37988882d is described below

commit 37988882d3f1d7644d1a5a4ad29b4856e668f693
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Wed Jul 27 09:39:37 2022 +0200

    [hotfix] Fix truncating and deleting data from data explorer
---
 .../org/apache/streampipes/dataexplorer/query/DeleteDataQuery.java    | 2 +-
 .../apache/streampipes/dataexplorer/v4/template/QueryTemplatesV4.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/DeleteDataQuery.java b/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/DeleteDataQuery.java
index 73d6be62d..4570927d3 100644
--- a/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/DeleteDataQuery.java
+++ b/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/query/DeleteDataQuery.java
@@ -30,7 +30,7 @@ public class DeleteDataQuery extends DataExplorerQuery<QueryResult> {
 
   @Override
   protected void getQuery(DataExplorerQueryBuilder queryBuilder) {
-    queryBuilder.add("DROP MEASUREMENT " + measure.getMeasureName());
+    queryBuilder.add("DROP MEASUREMENT \"" + measure.getMeasureName() + "\"");
   }
 
   @Override
diff --git a/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/template/QueryTemplatesV4.java b/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/template/QueryTemplatesV4.java
index 0023cc2b2..dd681d6f4 100644
--- a/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/template/QueryTemplatesV4.java
+++ b/streampipes-data-explorer/src/main/java/org/apache/streampipes/dataexplorer/v4/template/QueryTemplatesV4.java
@@ -42,11 +42,11 @@ public class QueryTemplatesV4 {
             joiner.add(builder);
         }
 
-        return "SELECT " + joiner + " FROM " + index;
+        return "SELECT " + joiner + " FROM \"" + index + "\"";
     }
 
     public static String deleteFrom(String index) {
-        return "DELETE FROM " + index;
+        return "DELETE FROM \"" + index + "\"";
     }
 
     public static String whereTimeWithin(long startDate, long endDate) {