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


##########
processing/src/main/java/org/apache/druid/segment/ColumnarValueUnnestCursor.java:
##########
@@ -0,0 +1,282 @@
+/*
+ * 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.segment;
+
+import org.apache.druid.query.BaseQuery;
+import org.apache.druid.query.dimension.DimensionSpec;
+import org.apache.druid.query.monomorphicprocessing.RuntimeShapeInspector;
+import org.apache.druid.segment.column.ColumnCapabilities;
+import org.joda.time.DateTime;
+
+import javax.annotation.Nullable;
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.List;
+
+public class ColumnarValueUnnestCursor implements Cursor
+{
+  private final Cursor baseCursor;
+  private final ColumnSelectorFactory baseColumSelectorFactory;
+  private final ColumnValueSelector columnValueSelector;
+  private final String columnName;
+  private final String outputName;
+  private final LinkedHashSet<String> allowSet;
+  private int index;
+  private Object currentVal;
+  private List<Object> unnestListForCurrentRow;
+  private boolean needInitialization;
+
+  public ColumnarValueUnnestCursor(
+      Cursor cursor,
+      ColumnSelectorFactory baseColumSelectorFactory,
+      String columnName,
+      String outputColumnName,
+      LinkedHashSet<String> allowSet
+  )
+  {
+    this.baseCursor = cursor;
+    this.baseColumSelectorFactory = baseColumSelectorFactory;
+    this.columnValueSelector = 
this.baseColumSelectorFactory.makeColumnValueSelector(columnName);
+    this.columnName = columnName;
+    this.index = 0;
+    this.outputName = outputColumnName;
+    this.needInitialization = true;
+    this.allowSet = allowSet;
+  }
+
+  @Override
+  public ColumnSelectorFactory getColumnSelectorFactory()
+  {
+    return new ColumnSelectorFactory()
+    {
+      @Override
+      public DimensionSelector makeDimensionSelector(DimensionSpec 
dimensionSpec)
+      {
+        throw new UnsupportedOperationException("Dimension selector not 
applicable for column value selector");

Review Comment:
   fixed



##########
processing/src/main/java/org/apache/druid/segment/ColumnarValueUnnestCursor.java:
##########
@@ -0,0 +1,286 @@
+/*
+ * 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.segment;
+
+import org.apache.druid.query.BaseQuery;
+import org.apache.druid.query.dimension.DefaultDimensionSpec;
+import org.apache.druid.query.dimension.DimensionSpec;
+import org.apache.druid.query.monomorphicprocessing.RuntimeShapeInspector;
+import org.apache.druid.segment.column.ColumnCapabilities;
+import org.joda.time.DateTime;
+
+import javax.annotation.Nullable;
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.List;
+
+public class ColumnarValueUnnestCursor implements Cursor

Review Comment:
   Added javadocs



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