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


##########
processing/src/main/java/org/apache/druid/query/FilterDataSource.java:
##########
@@ -0,0 +1,192 @@
+/*
+ * 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.druid.query;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.collect.ImmutableList;
+import org.apache.druid.java.util.common.IAE;
+import org.apache.druid.query.filter.DimFilter;
+import org.apache.druid.query.planning.DataSourceAnalysis;
+import org.apache.druid.segment.FilterStorageAdapter;
+import org.apache.druid.segment.SegmentReference;
+import org.apache.druid.segment.WrappedSegmentReference;
+import org.apache.druid.utils.JvmUtils;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.Function;
+
+/**
+ * This class models a data source to be unnested which is present along with 
a filter.
+ * An example for this data source follows:
+ *
+ * Consider this query:
+ * SELECT d3 FROM (select * from druid.numfoo where dim2='a'), 
UNNEST(MV_TO_ARRAY(dim3))
+ *
+ * where the filter data source has numFoo as base and dim2='a' as the filter
+ *
+ * Without this data source, the planner was converting the inner query to a 
query data source
+ * putting more work to be done at the broker level. This pushes the 
operations down to the
+ * segments and is more performant.
+ */
+public class FilterDataSource implements DataSource

Review Comment:
   Done the refactoring for data source and segment names



-- 
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