[
https://issues.apache.org/jira/browse/DRILL-8239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18104717#comment-18104717
]
ASF GitHub Bot commented on DRILL-8239:
---------------------------------------
shfshihuafeng commented on code in PR #2567:
URL: https://github.com/apache/drill/pull/2567#discussion_r3781868274
##########
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/project/ProjectRecordBatch.java:
##########
@@ -274,8 +338,10 @@ private void setValueCount(int count) {
for (ComplexWriter writer : complexWriters) {
writer.setValueCount(count);
}
- } else if (rsLoader != null) {
- rsLoader.setTargetRowCount(count);
+ } else if (!CollectionUtils.isEmpty(rsLoaders)) {
+ for (ResultSetLoader loader : rsLoaders) {
+ loader.setTargetRowCount(count);
Review Comment:
In my opinion, Multi-row queries don't change the branch logic here. Whether
complexWriters is null is decided at setup time (by addComplexField() →
initComplexWriters()), not per-batch.
Are you referring to a multi‑row scenario like following example? Query
reads 10,000 rows from test_multirow.json
and, for each row, concatenates id and name into a JSON string, then
converts it with convert_fromJSON. Does that match what you meant by "multi‑row
queries"?
```
{"id":6,"name":"user_6","value":60}
apache drill> SELECT
2..semicolon> convert_fromJSON(CONCAT('{"nested_id":', CAST(id AS
VARCHAR), ',"orig_name":"', name, '"}')) AS js
3..semicolon> FROM
4..semicolon> dfs.test.`test_multirow.json`;
```
> Convert JSON UDF to EVF
> -----------------------
>
> Key: DRILL-8239
> URL: https://issues.apache.org/jira/browse/DRILL-8239
> Project: Apache Drill
> Issue Type: Improvement
> Components: Execution - Data Types
> Affects Versions: 1.20.1
> Reporter: Charles Givre
> Assignee: Charles Givre
> Priority: Minor
>
> In an effort to fully deprecate the old JsonReader, this PR converts the
> convert_from JSON UDF to EVF.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)