[
https://issues.apache.org/jira/browse/DRILL-8248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17554221#comment-17554221
]
ASF GitHub Bot commented on DRILL-8248:
---------------------------------------
vvysotskyi commented on code in PR #2573:
URL: https://github.com/apache/drill/pull/2573#discussion_r897117091
##########
exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/loader/SingleElementIterator.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * 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.easy.json.loader;
+
+import java.util.Iterator;
+
+/**
+ * It allows setting current value in the iterator and cane be used once after
{@link #next} call
Review Comment:
```suggestion
* It allows setting the current value in the iterator and can be used once
after {@link #next} call
```
##########
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/project/ProjectRecordBatch.java:
##########
@@ -110,7 +110,7 @@ protected IterOutcome doWork() {
memoryManager.update();
if (first && incomingRecordCount == 0) {
- if (complexWriters != null || rsLoader != null ) {
+ if ((complexWriters != null && !complexWriters.isEmpty()) || rsLoader !=
null ) {
Review Comment:
`(complexWriters != null && !complexWriters.isEmpty())` ->
`!CollectionUtils.isEmpty(complexWriters)`
> Fix http_request for several rows
> ---------------------------------
>
> Key: DRILL-8248
> URL: https://issues.apache.org/jira/browse/DRILL-8248
> Project: Apache Drill
> Issue Type: Sub-task
> Components: Functions - Drill
> Reporter: Vitalii Diravka
> Assignee: Vitalii Diravka
> Priority: Major
>
> For example the following query should return 2 rows, but `http_request`
> return one row always.
> {code:java}
> SELECT `task_id`, http_request('devapp_cu./task/:task_id', `task_id`) as
> `Total`
> FROM(
> SELECT `Id` as `task_id`
> FROM `devapp_cu`.`/list/:list_id/task(custom_fields)`
> WHERE list_id = '180680339')
> LIMIT 2
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)