This is an automated email from the ASF dual-hosted git repository.

taiyang-li pushed a commit to branch fake_add_bolt_backend
in repository https://gitbox.apache.org/repos/asf/gluten.git

commit 91483bcf4119c9f59848773e859531a802451609
Author: liyang.127 <[email protected]>
AuthorDate: Sat Jun 27 11:10:57 2026 +0800

    [GLUTEN][CORE] Expose ColumnarBatches.isLightBatch/ensureOffloaded as public
    
    These two helpers are needed by out-of-package callers that produce or
    consume native-based columnar batches (e.g. a custom parquet batch
    writer under org.apache.spark.sql.execution.datasources), which cannot
    reach the package-private methods. Promote them to public so backends
    can reuse the batch type check and offload logic without duplicating it.
    
    Generated-by: TraeCli openrouter-3o
---
 .../main/java/org/apache/gluten/columnarbatch/ColumnarBatches.java   | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/gluten-arrow/src/main/java/org/apache/gluten/columnarbatch/ColumnarBatches.java
 
b/gluten-arrow/src/main/java/org/apache/gluten/columnarbatch/ColumnarBatches.java
index 40b931d92a..879d38f001 100644
--- 
a/gluten-arrow/src/main/java/org/apache/gluten/columnarbatch/ColumnarBatches.java
+++ 
b/gluten-arrow/src/main/java/org/apache/gluten/columnarbatch/ColumnarBatches.java
@@ -95,8 +95,7 @@ public final class ColumnarBatches {
    * Light batch: Data is not readable from JVM, a long int handle (which is a 
pointer usually) is
    * used to bind the batch to a native side implementation.
    */
-  @VisibleForTesting
-  static boolean isLightBatch(ColumnarBatch batch) {
+  public static boolean isLightBatch(ColumnarBatch batch) {
     return identifyBatchType(batch) == BatchType.LIGHT;
   }
 
@@ -128,7 +127,7 @@ public final class ColumnarBatches {
    * Ensure the input batch is offloaded as native-based columnar batch (See 
{@link IndicatorVector}
    * and {@link PlaceholderVector}). This method will close the input column 
batch after offloaded.
    */
-  static ColumnarBatch ensureOffloaded(BufferAllocator allocator, 
ColumnarBatch batch) {
+  public static ColumnarBatch ensureOffloaded(BufferAllocator allocator, 
ColumnarBatch batch) {
     if (ColumnarBatches.isLightBatch(batch)) {
       return batch;
     }


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

Reply via email to