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

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

vdiravka commented on code in PR #2571:
URL: https://github.com/apache/drill/pull/2571#discussion_r892701369


##########
contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/udfs/HttpUdfUtils.java:
##########
@@ -0,0 +1,63 @@
+/*
+ * 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.http.udfs;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.drill.exec.physical.resultSet.ResultSetLoader;
+import org.apache.drill.exec.server.options.OptionManager;
+import 
org.apache.drill.exec.store.easy.json.loader.JsonLoaderImpl.JsonLoaderBuilder;
+import org.apache.drill.exec.store.easy.json.loader.JsonLoaderOptions;
+import org.apache.drill.exec.store.http.HttpApiConfig;
+import org.apache.drill.exec.store.http.HttpJsonOptions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class HttpUdfUtils {
+
+  private static final Logger logger = 
LoggerFactory.getLogger(HttpUdfUtils.class);
+
+  public static JsonLoaderBuilder setupJsonBuilder(HttpApiConfig 
endpointConfig, ResultSetLoader loader, OptionManager options) {
+    logger.debug(String.valueOf(options));

Review Comment:
   It will print classname and this object hash for all `OptionManager` 
implementation. Is it useful? If yes, it makes sence to add some context info 
here.



##########
contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/udfs/HttpHelperFunctions.java:
##########
@@ -153,10 +149,15 @@ public void setup() {
         drillbitContext,
         pluginName
       );
+
       endpointConfig = 
org.apache.drill.exec.store.http.util.SimpleHttp.getEndpointConfig(
         endpointName,
         plugin.getConfig()
       );
+
+      // Add JSON configuration from Storage plugin, if present.
+      jsonLoaderBuilder = 
org.apache.drill.exec.store.http.udfs.HttpUdfUtils.setupJsonBuilder(endpointConfig,
 loader, options);

Review Comment:
   Looks like the same should be applied for the `http_get` and `httpGet`: (62 
row)
   





> HTTP_Request Not Passing Down Config Variable
> ---------------------------------------------
>
>                 Key: DRILL-8244
>                 URL: https://issues.apache.org/jira/browse/DRILL-8244
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Other
>    Affects Versions: 1.20.1
>            Reporter: Charles Givre
>            Assignee: Charles Givre
>            Priority: Major
>             Fix For: 2.0.0
>
>
> The http_request UDF was not passing down the provided schema and other 
> config parameters down to the jsonLoader.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to