You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by ch...@apache.org on 2024/03/20 01:34:46 UTC
(incubator-gluten) branch main updated: [GLUTEN-5009][CH] Fix TPCDS q9 failed with debug build (#5015)
This is an automated email from the ASF dual-hosted git repository.
changchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 8dbca6cfe [GLUTEN-5009][CH] Fix TPCDS q9 failed with debug build (#5015)
8dbca6cfe is described below
commit 8dbca6cfe979d12e775b07e7096f169420e36480
Author: exmy <xu...@gmail.com>
AuthorDate: Wed Mar 20 09:34:42 2024 +0800
[GLUTEN-5009][CH] Fix TPCDS q9 failed with debug build (#5015)
---
cpp-ch/local-engine/Parser/CHColumnToSparkRow.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/cpp-ch/local-engine/Parser/CHColumnToSparkRow.cpp b/cpp-ch/local-engine/Parser/CHColumnToSparkRow.cpp
index c48cd84e9..c3ff32a97 100644
--- a/cpp-ch/local-engine/Parser/CHColumnToSparkRow.cpp
+++ b/cpp-ch/local-engine/Parser/CHColumnToSparkRow.cpp
@@ -696,6 +696,12 @@ int64_t VariableLengthDataWriter::writeArray(size_t row_idx, const DB::Array & a
writer.unsafeWrite(
reinterpret_cast<const char *>(&v), buffer_address + offset + start + 8 + len_null_bitmap + i * elem_size);
}
+ else if (writer.getWhichDataType().isFloat64())
+ {
+ // Fix 'Invalid Field get from type Float64 to type Int64' in debug build.
+ auto v = elem.get<Float64>();
+ writer.unsafeWrite(reinterpret_cast<const char *>(&v), buffer_address + offset + start + 8 + len_null_bitmap + i * elem_size);
+ }
else
writer.unsafeWrite(
reinterpret_cast<const char *>(&elem.get<char>()),
@@ -808,6 +814,12 @@ int64_t VariableLengthDataWriter::writeStruct(size_t row_idx, const DB::Tuple &
auto v = static_cast<Float32>(field_value.get<Float32>());
writer.unsafeWrite(reinterpret_cast<const char *>(&v), buffer_address + offset + start + len_null_bitmap + i * 8);
}
+ else if (writer.getWhichDataType().isFloat64())
+ {
+ // Fix 'Invalid Field get from type Float64 to type Int64' in debug build.
+ auto v = field_value.get<Float64>();
+ writer.unsafeWrite(reinterpret_cast<const char *>(&v), buffer_address + offset + start + len_null_bitmap + i * 8);
+ }
else
writer.unsafeWrite(
reinterpret_cast<const char *>(&field_value.get<char>()), buffer_address + offset + start + len_null_bitmap + i * 8);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org