This is an automated email from the ASF dual-hosted git repository.
kakachen pushed a commit to branch orc
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/orc by this push:
new 46a8a612b03 [fix](orc) fix be ut (#260)
46a8a612b03 is described below
commit 46a8a612b036a846e320e75bcb09113c6c1daba3
Author: Socrates <[email protected]>
AuthorDate: Wed Dec 11 16:28:55 2024 +0800
[fix](orc) fix be ut (#260)
---
c++/test/TestStripeIndexStatistics.cc | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/c++/test/TestStripeIndexStatistics.cc
b/c++/test/TestStripeIndexStatistics.cc
index 34a4649c35d..d9a4da66277 100644
--- a/c++/test/TestStripeIndexStatistics.cc
+++ b/c++/test/TestStripeIndexStatistics.cc
@@ -45,19 +45,22 @@ namespace orc {
const orc::IntegerColumnStatistics* intColStats;
intColStats = reinterpret_cast<const orc::IntegerColumnStatistics*>(
stripeStats->getRowIndexStatistics(1, 0));
+ // (syt) For forward compatibility, if has_null is not set in the orc
file, it should be
+ // regarded as has_null is true
EXPECT_EQ(
- "Data type: Integer\nValues: 2000\nHas null: no\nMinimum: 1\nMaximum:
2000\nSum: 2001000\n",
+ "Data type: Integer\nValues: 2000\nHas null: yes\nMinimum: 1\nMaximum:
2000\nSum: "
+ "2001000\n",
intColStats->toString());
intColStats = reinterpret_cast<const orc::IntegerColumnStatistics*>(
stripeStats->getRowIndexStatistics(1, 1));
EXPECT_EQ(
- "Data type: Integer\nValues: 2000\nHas null: no\nMinimum:
2001\nMaximum: 4000\nSum: "
+ "Data type: Integer\nValues: 2000\nHas null: yes\nMinimum:
2001\nMaximum: 4000\nSum: "
"6001000\n",
intColStats->toString());
intColStats = reinterpret_cast<const orc::IntegerColumnStatistics*>(
stripeStats->getRowIndexStatistics(1, 2));
EXPECT_EQ(
- "Data type: Integer\nValues: 2000\nHas null: no\nMinimum:
4001\nMaximum: 6000\nSum: "
+ "Data type: Integer\nValues: 2000\nHas null: yes\nMinimum:
4001\nMaximum: 6000\nSum: "
"10001000\n",
intColStats->toString());
@@ -65,20 +68,20 @@ namespace orc {
stringColStats = reinterpret_cast<const orc::StringColumnStatistics*>(
stripeStats->getRowIndexStatistics(2, 0));
EXPECT_EQ(
- "Data type: String\nValues: 2000\nHas null: no\nMinimum:
1000\nMaximum: 9a\nTotal length: "
+ "Data type: String\nValues: 2000\nHas null: yes\nMinimum:
1000\nMaximum: 9a\nTotal length: "
"7892\n",
stringColStats->toString());
stringColStats = reinterpret_cast<const orc::StringColumnStatistics*>(
stripeStats->getRowIndexStatistics(2, 1));
EXPECT_EQ(
- "Data type: String\nValues: 2000\nHas null: no\nMinimum:
2001\nMaximum: 4000\nTotal "
+ "Data type: String\nValues: 2000\nHas null: yes\nMinimum:
2001\nMaximum: 4000\nTotal "
"length: "
"8000\n",
stringColStats->toString());
stringColStats = reinterpret_cast<const orc::StringColumnStatistics*>(
stripeStats->getRowIndexStatistics(2, 2));
EXPECT_EQ(
- "Data type: String\nValues: 2000\nHas null: no\nMinimum:
4001\nMaximum: 6000\nTotal "
+ "Data type: String\nValues: 2000\nHas null: yes\nMinimum:
4001\nMaximum: 6000\nTotal "
"length: "
"8000\n",
stringColStats->toString());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]