Skip to content

Commit

Permalink
fix gtest due to #6722
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaichen committed Aug 8, 2024
1 parent 3d2ed3b commit 02e411f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp-ch/local-engine/tests/gtest_spark_row.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ TEST(SparkRow, GetArrayElementSize)
{std::make_shared<DataTypeUInt32>(), 4},
{std::make_shared<DataTypeFloat32>(), 4},
{std::make_shared<DataTypeDate32>(), 4},
{std::make_shared<DataTypeDecimal32>(9, 4), 4},
{std::make_shared<DataTypeDecimal32>(9, 4), 8},
{std::make_shared<DataTypeInt64>(), 8},
{std::make_shared<DataTypeUInt64>(), 8},
{std::make_shared<DataTypeFloat64>(), 8},
Expand All @@ -152,11 +152,11 @@ TEST(SparkRow, GetArrayElementSize)

for (const auto & [type, size] : type_to_size)
{
EXPECT_TRUE(BackingDataLengthCalculator::getArrayElementSize(type) == size);
EXPECT_EQ(size, BackingDataLengthCalculator::getArrayElementSize(type));
if (type->canBeInsideNullable())
{
const auto type_with_nullable = std::make_shared<DataTypeNullable>(type);
EXPECT_TRUE(BackingDataLengthCalculator::getArrayElementSize(type_with_nullable) == size);
EXPECT_EQ(size, BackingDataLengthCalculator::getArrayElementSize(type_with_nullable));
}
}
}
Expand Down

0 comments on commit 02e411f

Please sign in to comment.