czentgr commented on code in PR #8474:
URL: https://github.com/apache/incubator-gluten/pull/8474#discussion_r1911642448
##########
cpp/velox/tests/VeloxSubstraitRoundTripTest.cc:
##########
@@ -368,12 +368,12 @@ TEST_F(VeloxSubstraitRoundTripTest, notNullLiteral) {
.addNode([&](std::string id, core::PlanNodePtr input) {
std::vector<std::string> projectNames = {"a", "b", "c",
"d", "e", "f", "g", "h"};
std::vector<core::TypedExprPtr> projectExpressions = {
- makeConstantExpr(BOOLEAN(), static_cast<bool>(1)),
- makeConstantExpr(TINYINT(), static_cast<int8_t>(23)),
- makeConstantExpr(SMALLINT(), static_cast<int16_t>(45)),
- makeConstantExpr(INTEGER(), static_cast<int32_t>(678)),
- makeConstantExpr(BIGINT(), static_cast<int64_t>(910)),
- makeConstantExpr(REAL(), static_cast<float>(1.23)),
+ makeConstantExpr(BOOLEAN(), 1),
Review Comment:
What's wrong with these but not the last double cast?
##########
cpp/velox/shuffle/VeloxShuffleReader.cc:
##########
@@ -440,7 +440,7 @@ std::shared_ptr<ColumnarBatch>
VeloxSortShuffleReaderDeserializer::deserializeTo
auto buffer = cur->second;
const auto* rawBuffer = buffer->as<char>();
while (rowOffset_ < cur->first && readRows < batchSize_) {
- auto rowSize = *(RowSizeType*)(rawBuffer + byteOffset_) -
sizeof(RowSizeType);
+ auto rowSize = *(static_cast<RowSizeType*>(rawBuffer + byteOffset_)) -
sizeof(RowSizeType);
Review Comment:
Is there a reason that you don't use this one liner for other occurrences?
In other cases you are splitting it into two lines (first the ptr and then
the dereference, for example, previous file line 186ff.
--
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]