zhztheplayer commented on code in PR #8161: URL: https://github.com/apache/incubator-gluten/pull/8161#discussion_r1873075825
########## backends-velox/src/main/scala/org/apache/gluten/execution/RangeExecTransformer.scala: ########## @@ -0,0 +1,139 @@ +/* + * 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.gluten.execution + +import org.apache.gluten.columnarbatch.ColumnarBatches +import org.apache.gluten.iterator.Iterators +import org.apache.gluten.memory.arrow.alloc.ArrowBufferAllocators +import org.apache.gluten.vectorized.ArrowWritableColumnVector + +import org.apache.spark.rdd.RDD +import org.apache.spark.sql.catalyst.expressions.Attribute +import org.apache.spark.sql.execution.SparkPlan +import org.apache.spark.sql.internal.SQLConf +import org.apache.spark.sql.utils.SparkArrowUtil +import org.apache.spark.sql.vectorized.{ColumnarBatch, ColumnVector} + +/** + * RangeExecTransformer is a concrete implementation of RangeExecBaseTransformer that executes the + * Range operation and supports columnar processing. It generates columnar batches for the specified + * range. + * + * @param start + * Starting value of the range. + * @param end + * Ending value of the range. + * @param step + * Step size for the range. + * @param numSlices + * Number of slices for partitioning the range. + * @param numElements + * Total number of elements in the range. + * @param outputAttributes + * Attributes defining the output schema of the operator. + * @param child + * Child SparkPlan nodes for this operator, if any. + */ +case class RangeExecTransformer( Review Comment: Can we name it "ColumnarRangeExec" (or `VeloxColumnarRangeExec` or something) as it doesn't extend the `TransformSupport` trait? Thanks. -- 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]
