From 7b310e91d4e1e10c6dfcb0fbd21046d5f36b2e54 Mon Sep 17 00:00:00 2001 From: Raza Jafri Date: Wed, 20 Oct 2021 15:31:18 -0700 Subject: [PATCH] debug Signed-off-by: Raza Jafri --- .../rapids/UnsafeRowToColumnarBatchIterator.java | 4 ++-- .../nvidia/spark/rapids/GpuColumnarToRowExec.scala | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sql-plugin/src/main/java/com/nvidia/spark/rapids/UnsafeRowToColumnarBatchIterator.java b/sql-plugin/src/main/java/com/nvidia/spark/rapids/UnsafeRowToColumnarBatchIterator.java index a08a76d20ee..755cf92493a 100644 --- a/sql-plugin/src/main/java/com/nvidia/spark/rapids/UnsafeRowToColumnarBatchIterator.java +++ b/sql-plugin/src/main/java/com/nvidia/spark/rapids/UnsafeRowToColumnarBatchIterator.java @@ -169,12 +169,12 @@ public ColumnarBatch next() { // We are branching over the output.length to know which kernel to call. // If output.length < 100 we call the fixed-width optimized version, otherwise the // generic one - Table tab = isOptimizedForFixedWidth ? + Table tab = //isOptimizedForFixedWidth ? // The fixed-width optimized cudf kernel only supports up to 1.5 KB per row which means // at most 184 double/long values. We are branching over the output.length to know // which kernel to call. If output.length < 100 we call the fixed-width optimized // version, otherwise the generic one - Table.convertFromRowsFixedWidthOptimized(cv, rapidsTypes) : +// Table.convertFromRowsFixedWidthOptimized(cv, rapidsTypes) : Table.convertFromRows(cv, rapidsTypes)) { return GpuColumnVector.from(tab, outputTypes); } diff --git a/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuColumnarToRowExec.scala b/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuColumnarToRowExec.scala index d31a977855f..304b3eed576 100644 --- a/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuColumnarToRowExec.scala +++ b/sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuColumnarToRowExec.scala @@ -115,11 +115,10 @@ class AcceleratedColumnarToRowIterator( // until we have tested it more. We branching over the output.length to know which kernel // to call. If output.length < 100 we call the fixed-width optimized version, otherwise // the generic one - withResource(if (isFixedWidthOptimized) { - table.convertToRowsFixedWidthOptimized() - } else { - table.convertToRows() - }) { rowsCvList => + withResource( // if (isFixedWidthOptimized) { +// table.convertToRowsFixedWidthOptimized() +// } else { + table.convertToRows()) { rowsCvList => rowsCvList.foreach { rowsCv => pendingCvs += rowsCv.copyToHost() } @@ -350,7 +349,7 @@ object GpuColumnarToRowExecParent { // We are being conservative by only allowing 100M columns until we feel the need to // increase this number output.length <= 100000000) { - (batches: Iterator[ColumnarBatch]) => { + batches: Iterator[ColumnarBatch] => { // UnsafeProjection is not serializable so do it on the executor side val toUnsafe = UnsafeProjection.create(output, output) new AcceleratedColumnarToRowIterator(output, batches, numInputBatches, numOutputRows,