somu-imply commented on code in PR #13268:
URL: https://github.com/apache/druid/pull/13268#discussion_r1035504620


##########
processing/src/main/java/org/apache/druid/query/UnnestDataSource.java:
##########
@@ -139,20 +135,27 @@ public Function<SegmentReference, SegmentReference> 
createSegmentMapFunction(
       AtomicLong cpuTimeAccumulator
   )
   {
+    final Function<SegmentReference, SegmentReference> segmentMapFn = 
base.createSegmentMapFunction(
+        query,
+        cpuTimeAccumulator
+    );
     return JvmUtils.safeAccumulateThreadCpuTime(
         cpuTimeAccumulator,
         () -> {
           if (column == null) {
-            return Function.identity();
+            return segmentMapFn;
           } else if (column.isEmpty()) {
-            return Function.identity();
+            return segmentMapFn;
           } else {
-            return baseSegment ->
-                new UnnestSegmentReference(
-                    baseSegment,
-                    column,
-                    outputName,
-                    allowList
+            return
+                segmentMapFn.andThen(

Review Comment:
   Addressed, creating new object now



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to