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

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

commit e6d77bd89092d46e9f7b036735a6ede664dbc4be
Author: Philipp Zehnder <[email protected]>
AuthorDate: Tue Mar 28 16:40:17 2023 +0200

    [hotfix] Add test for DataLakeQueryBuilder
---
 .../dataexplorer/sdk/DataLakeQueryBuilderTest.java | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git 
a/streampipes-data-explorer/src/test/java/org/apache/streampipes/dataexplorer/sdk/DataLakeQueryBuilderTest.java
 
b/streampipes-data-explorer/src/test/java/org/apache/streampipes/dataexplorer/sdk/DataLakeQueryBuilderTest.java
new file mode 100644
index 000000000..82a999463
--- /dev/null
+++ 
b/streampipes-data-explorer/src/test/java/org/apache/streampipes/dataexplorer/sdk/DataLakeQueryBuilderTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.streampipes.dataexplorer.sdk;
+
+import org.junit.Test;
+
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+
+public class DataLakeQueryBuilderTest {
+
+  private static final String MEASUREMENT = "measurement";
+  @Test
+  public void withSimpleColumnsTest() {
+    var result = DataLakeQueryBuilder
+        .create(MEASUREMENT)
+        .withSimpleColumns(List.of("one", "two"))
+        .build();
+
+    var expected = String.format("SELECT one,two FROM \"%s\";", MEASUREMENT);
+    assertEquals(expected , result.getCommand());
+  }
+}
\ No newline at end of file

Reply via email to