yaooqinn commented on code in PR #12101:
URL: https://github.com/apache/gluten/pull/12101#discussion_r3265142986


##########
cpp/velox/benchmarks/VeloxBatchResizerBenchmark.cc:
##########
@@ -0,0 +1,568 @@
+/*
+ * 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.
+ */
+
+#include <limits>
+#include <memory>
+#include <optional>
+#include <string>
+#include <vector>
+
+#include <arrow/util/bit_util.h>
+#include <arrow/util/bitmap_ops.h>
+#include <benchmark/benchmark.h>
+
+#include "memory/ColumnarBatchIterator.h"
+#include "memory/VeloxColumnarBatch.h"
+#include "shuffle/Payload.h"
+#include "utils/Exception.h"
+#include "utils/VeloxBatchResizer.h"
+#include "velox/common/memory/Memory.h"
+#include "velox/vector/ComplexVector.h"
+#include "velox/vector/FlatVector.h"
+
+using namespace facebook::velox;
+
+namespace gluten {
+namespace {
+
+constexpr int32_t kInputBatches = 64;
+constexpr int32_t kRowsPerBatch = 64;
+constexpr int32_t kTotalRows = kInputBatches * kRowsPerBatch;
+constexpr int64_t kPreferredBatchBytes = std::numeric_limits<int64_t>::max();

Review Comment:
   The 7 benchmark scenarios are all dense-flat, but `enableCopyRanges=true` 
(default) silently routes dictionary / constant / topLevelNull inputs through 
`RowVector::copy` (`VeloxBatchResizer.cc:148`). Suggest adding 1 dict-heavy + 1 
constant-heavy scenario to validate the fallback path is at least perf-neutral 
before flipping the default on.



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