[jira] [Commented] (DRILL-8357) Add new config options to the Splunk storage plugin

2022-11-15 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DRILL-8357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634280#comment-17634280
 ] 

ASF GitHub Bot commented on DRILL-8357:
---

jnturton opened a new pull request, #2706:
URL: https://github.com/apache/drill/pull/2706

   # [DRILL-8357](https://issues.apache.org/jira/browse/DRILL-8357): Add new 
config options to the Splunk storage plugin (extra docs)
   
   ## Description
   
   Extra documentation for the new options introduced in the original PR.
   
   ## Documentation
   Here it is.
   
   ## Testing
   N/A
   




> Add new config options to the Splunk storage plugin
> ---
>
> Key: DRILL-8357
> URL: https://issues.apache.org/jira/browse/DRILL-8357
> Project: Apache Drill
>  Issue Type: Improvement
>  Components: Storage - Other
>Affects Versions: 1.20.2
>Reporter: James Turton
>Assignee: James Turton
>Priority: Minor
> Fix For: 2.0.0
>
>
> The following five new options can be added to the Splunk storage config.
> {code:java}
>   // Whether the Splunk client will validates the server's SSL cert.
>   private final boolean validateCertificates;
>   // The application context of the service.
>   private final String app;
>   // The owner context of the service.
>   private final String owner;
>   // A Splunk authentication token to use for the session.
>   private final String token;
>   // A valid login cookie.
>   private final String cookie;{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DRILL-8353) Format plugin for Delta Lake

2022-11-15 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DRILL-8353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634334#comment-17634334
 ] 

ASF GitHub Bot commented on DRILL-8353:
---

jnturton commented on code in PR #2702:
URL: https://github.com/apache/drill/pull/2702#discussion_r1017953161


##
contrib/format-deltalake/README.md:
##
@@ -0,0 +1,36 @@
+# Delta Lake format plugin
+
+This format plugin enabled Drill to query Delta Lake tables.

Review Comment:
   ```suggestion
   This format plugin enables Drill to query Delta Lake tables.
   ```



##
contrib/format-deltalake/README.md:
##
@@ -0,0 +1,36 @@
+# Delta Lake format plugin
+
+This format plugin enabled Drill to query Delta Lake tables.
+
+## Supported optimizations and features
+
+### Project pushdown
+
+This format plugin supports project and filter pushdown optimizations.
+
+For the case of project pushdown, only columns specified in the query will be 
read, even they are nested columns.

Review Comment:
   ```suggestion
   For the case of project pushdown, only columns specified in the query will 
be read, even when they are nested columns.
   ```



##
contrib/format-deltalake/src/test/java/org/apache/drill/exec/store/delta/DeltaQueriesTest.java:
##
@@ -0,0 +1,195 @@
+/*
+ * 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.drill.exec.store.delta;
+
+import org.apache.drill.common.logical.FormatPluginConfig;
+import org.apache.drill.common.logical.security.PlainCredentialsProvider;
+import org.apache.drill.exec.store.StoragePluginRegistry;
+import org.apache.drill.exec.store.delta.format.DeltaFormatPluginConfig;
+import org.apache.drill.exec.store.dfs.FileSystemConfig;
+import org.apache.drill.test.ClusterFixture;
+import org.apache.drill.test.ClusterTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.math.BigDecimal;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+
+import static 
org.apache.drill.exec.util.StoragePluginTestUtils.DFS_PLUGIN_NAME;
+import static org.junit.Assert.assertEquals;
+
+public class DeltaQueriesTest extends ClusterTest {
+
+  @BeforeClass
+  public static void setUpBeforeClass() throws Exception {
+startCluster(ClusterFixture.builder(dirTestWatcher));
+
+StoragePluginRegistry pluginRegistry = 
cluster.drillbit().getContext().getStorage();
+FileSystemConfig pluginConfig = (FileSystemConfig) 
pluginRegistry.getPlugin(DFS_PLUGIN_NAME).getConfig();
+Map formats = new 
HashMap<>(pluginConfig.getFormats());
+formats.put("delta", new DeltaFormatPluginConfig());
+FileSystemConfig newPluginConfig = new FileSystemConfig(
+  pluginConfig.getConnection(),
+  pluginConfig.getConfig(),
+  pluginConfig.getWorkspaces(),
+  formats,
+  PlainCredentialsProvider.EMPTY_CREDENTIALS_PROVIDER);
+newPluginConfig.setEnabled(pluginConfig.isEnabled());
+pluginRegistry.put(DFS_PLUGIN_NAME, newPluginConfig);
+
+dirTestWatcher.copyResourceToRoot(Paths.get("data-reader-primitives"));
+
dirTestWatcher.copyResourceToRoot(Paths.get("data-reader-partition-values"));
+dirTestWatcher.copyResourceToRoot(Paths.get("data-reader-nested-struct"));
+  }
+
+  @Test
+  public void testSerDe() throws Exception {
+String plan = queryBuilder().sql("select * from 
dfs.`data-reader-partition-values`").explainJson();
+long count = queryBuilder().physical(plan).run().recordCount();
+assertEquals(3, count);
+  }
+
+  @Test
+  public void testAllPrimitives() throws Exception {
+testBuilder()
+  .sqlQuery("select * from dfs.`data-reader-primitives`")
+  .ordered()
+  .baselineColumns("as_int", "as_long", "as_byte", "as_short", 
"as_boolean", "as_float",
+"as_double", "as_string", "as_binary", "as_big_decimal")
+  .baselineValues(null, null, null, null, null, null, null, null, null, 
null)
+  .baselineValues(0, 0L, 0, 0, true, 0.0f, 0.0, "0", new byte[]{0, 0}, 
BigDecimal.valueOf(0))
+  .baselineValues(1, 1L, 1, 1, false, 1.0f, 1.0, "1", new byte[]{1, 1}, 
BigDecimal.valueOf(1))
+  .baselineValues(2, 2L, 2, 2, true, 2

[jira] [Commented] (DRILL-8357) Add new config options to the Splunk storage plugin

2022-11-15 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DRILL-8357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634335#comment-17634335
 ] 

ASF GitHub Bot commented on DRILL-8357:
---

jnturton merged PR #2706:
URL: https://github.com/apache/drill/pull/2706




> Add new config options to the Splunk storage plugin
> ---
>
> Key: DRILL-8357
> URL: https://issues.apache.org/jira/browse/DRILL-8357
> Project: Apache Drill
>  Issue Type: Improvement
>  Components: Storage - Other
>Affects Versions: 1.20.2
>Reporter: James Turton
>Assignee: James Turton
>Priority: Minor
> Fix For: 2.0.0
>
>
> The following five new options can be added to the Splunk storage config.
> {code:java}
>   // Whether the Splunk client will validates the server's SSL cert.
>   private final boolean validateCertificates;
>   // The application context of the service.
>   private final String app;
>   // The owner context of the service.
>   private final String owner;
>   // A Splunk authentication token to use for the session.
>   private final String token;
>   // A valid login cookie.
>   private final String cookie;{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)