apache / cloudberry

One advanced and mature open-source MPP (Massively Parallel Processing) database. Open source alternative to Greenplum Database.
https://cloudberry.apache.org
Apache License 2.0
659 stars 113 forks source link

[ORCA] uttests in gporca failed #753

Open fanfuxiaoran opened 12 hours ago

fanfuxiaoran commented 12 hours ago

Apache Cloudberry version

No response

What happened

I tried run the uttests on my laptop, some tests failed

ctest -j8 --output-on-failure
The following tests FAILED:
     41 - gporca_test_CAntiSemiJoinTest (Failed)
     42 - gporca_test_CPredicateTest (Failed)
     46 - gporca_test_CIndexScanTest (Failed)
     47 - gporca_test_CBitmapScanTest (Failed)
     48 - gporca_test_CIndexApplyTest (Failed)
     49 - gporca_test_CDynamicIndexScanTest (Failed)
     51 - gporca_test_CStatsTest (Failed)
     56 - gporca_test_CProjectTest (Failed)
     60 - gporca_test_CPartTbl4Test (Failed)
     63 - gporca_test_CPartTblDPETest (Failed)
     65 - gporca_test_CSetop1Test (Failed)
     66 - gporca_test_CSetop2Test (Failed)
     67 - gporca_test_CSetop3Test (Failed)
     68 - gporca_test_CSetop4Test (Failed)
     69 - gporca_test_CEquivClassTest (Failed)
     71 - gporca_test_COuterJoin2Test (Failed)
     72 - gporca_test_COuterJoin3Test (Failed)
     73 - gporca_test_CFullJoinTest (Failed)
     75 - gporca_test_CMotionHazardTest (Failed)
     76 - gporca_test_CConstraintNegationTest (Failed)
     79 - gporca_test_CRandomDataInsertionTest (Failed)
     80 - gporca_test_CGistIndexTest (Failed)
     86 - gporca_test_COpfamiliesTest (Failed)
     87 - gporca_test_CSubquery2Test (Failed)
     92 - gporca_test_COrderedAggTest (Failed)
     94 - gporca_test_CExternalTableTest (Failed)
    105 - gporca_test_CICGTest (Failed)
    106 - gporca_test_CDMLTest (Failed)
    110 - gporca_test_CAggTest (Failed)
    111 - gporca_test_CSubqueryTest (Failed)
    115 - gporca_test_CBitmapTest (Failed)
    116 - gporca_test_CCTETest (Failed)
    143 - gporca_test_CCastTest (Failed)
    148 - gporca_test_CBindingTest (Failed)
    151 - gporca_test_CExpressionTest (Failed)
Errors while running CTest

What you think should happen instead

No response

How to reproduce

ctest -j8 --output-on-failure

Operating System

centos7

Anything else

No response

Are you willing to submit PR?

Code of Conduct

jiaqizho commented 12 hours ago

I think that some of tests require the minidump, checkout CICGTest.cpp. I am not sure that we can direct use the ctest -j8 to run the ut.

fanfuxiaoran commented 12 hours ago

I think that some of tests require the minidump, checkout CICGTest.cpp. I am not sure that we can direct use the ctest -j8 to run the ut.

Not all the minidump files are included in the test data path? I just followed the README.md to run them, maybe not correct. I tried to run the test CExpressionTest, it could get the data file, but just failed.

2024-12-04 16:20:13:295094 CST,THD000,TRACE,"opening file ../data/dxl/expressiontests/WinFunc-OuterRef-Partition-Query.xml",
2024-12-04 16:20:13:315021 CST,THD000,TRACE,"opening file ../data/dxl/expressiontests/WinFunc-OuterRef-Partition-Query.xml",
2024-12-04 16:20:13:438114 CST,THD000,NOTICE,"Operator Fallback: InnerIndexNestLoopJoin may have wrong plan not supported",
2024-12-04 16:20:13:438443 CST,THD000,TRACE,"timer:EresUnittest_ReqdCols: 802ms",
2024-12-04 16:20:13:438455 CST,THD000,TRACE,"Unittest EresUnittest_ReqdCols...*** FAILED ***.",
2024-12-04 16:20:13:441304 CST,THD000,TRACE,"
Invalid SetOp Expression:
+--CLogicalUnion Output: ("column_0000" (0)), Input: [("column_0000" (0)), ("ColRef_0006" (6))]
   |--CLogicalGet "T1Alias" ("T1"), Columns: ["column_0000" (0), "column_0001" (1), "column_0002" (2)] Key sets: {[0]}
   +--CLogicalGet "T2Alias" ("T2"), Columns: ["column_0000" (3), "column_0001" (4), "column_0002" (5)] Key sets: {[0]}
",
2024-12-04 16:20:13:442636 CST,THD000,ERROR,"../libgpopt/src/operators/CLogicalSetOp.cpp:160: Failed assertion: pcrsChildOutput->ContainsAll(pcrsInput) && "Unexpected outer references in SetOp input"
Stack trace:
1    0x00007fe52a72fa10 gpos::CException::Raise + 256
2    0x00007fe52c9b096c gpopt::CLogicalSetOp::DeriveOutputColumns + 180
3    0x00007fe52c910167 gpopt::CDrvdPropRelational::DeriveOutputColumns + 109
4    0x00007fe52c90f452 gpopt::CDrvdPropRelational::Derive + 60
5    0x00007fe52c96e40c gpopt::CExpression::PdpDerive + 684
6    0x00000000004e7845 gpopt::CExpressionTest::EresUnittest_InvalidSetOp + 1267
7    0x00007fe52a746905 gpos::CUnittest::EresExecTest + 81
8    0x00007fe52a746b4e gpos::CUnittest::EresExecute + 118
9    0x00000000004e1d7e gpopt::CExpressionTest::EresUnittest + 398
10   0x00007fe52a746905 gpos::CUnittest::EresExecTest + 81
11   0x00007fe52a746b4e gpos::CUnittest::EresExecute + 118
12   0x00007fe52a746e80 gpos::CUnittest::Driver + 192
13   0x0000000000475e79 <symbol not found> + 4677241
14   0x00007fe52a7422e6 gpos::CTask::Execute + 180
15   0x00007fe52a744ad1 gpos::CWorker::Execute + 187
16   0x00007fe52a74086a gpos::CAutoTaskProxy::Execute + 202
17   0x00007fe52a727b12 gpos_exec + 773
",
2024-12-04 16:20:13:444791 CST,THD000,TRACE,"timer:CExpressionTest::EresUnittest_InvalidSetOp: 6ms",
2024-12-04 16:20:13:444801 CST,THD000,TRACE,"Unittest CExpressionTest::EresUnittest_InvalidSetOp...OK.",
2024-12-04 16:20:13:444886 CST,THD000,TRACE,"timer:CExpressionTest: 1038ms",
2024-12-04 16:20:13:444894 CST,THD000,TRACE,"Unittest CExpressionTest...*** FAILED ***.",
2024-12-04 16:20:13:445007 CST,THD000,TRACE,"timer:total test run time: 1039ms",
2024-12-04 16:20:13:445014 CST,THD000,TRACE,"Tests succeeded: 0",
2024-12-04 16:20:13:445021 CST,THD000,TRACE,"Tests failed:    1",
jiaqizho commented 12 hours ago

I think that some of tests require the minidump, checkout CICGTest.cpp. I am not sure that we can direct use the ctest -j8 to run the ut.

Not all the minidump files are included in the test data path? I just followed the README.md to run them, maybe not correct. I tried to run the test CExpressionTest, it could get the data file, but just failed.

2024-12-04 16:20:13:295094 CST,THD000,TRACE,"opening file ../data/dxl/expressiontests/WinFunc-OuterRef-Partition-Query.xml",
2024-12-04 16:20:13:315021 CST,THD000,TRACE,"opening file ../data/dxl/expressiontests/WinFunc-OuterRef-Partition-Query.xml",
2024-12-04 16:20:13:438114 CST,THD000,NOTICE,"Operator Fallback: InnerIndexNestLoopJoin may have wrong plan not supported",
2024-12-04 16:20:13:438443 CST,THD000,TRACE,"timer:EresUnittest_ReqdCols: 802ms",
2024-12-04 16:20:13:438455 CST,THD000,TRACE,"Unittest EresUnittest_ReqdCols...*** FAILED ***.",
2024-12-04 16:20:13:441304 CST,THD000,TRACE,"
Invalid SetOp Expression:
+--CLogicalUnion Output: ("column_0000" (0)), Input: [("column_0000" (0)), ("ColRef_0006" (6))]
   |--CLogicalGet "T1Alias" ("T1"), Columns: ["column_0000" (0), "column_0001" (1), "column_0002" (2)] Key sets: {[0]}
   +--CLogicalGet "T2Alias" ("T2"), Columns: ["column_0000" (3), "column_0001" (4), "column_0002" (5)] Key sets: {[0]}
",
2024-12-04 16:20:13:442636 CST,THD000,ERROR,"../libgpopt/src/operators/CLogicalSetOp.cpp:160: Failed assertion: pcrsChildOutput->ContainsAll(pcrsInput) && "Unexpected outer references in SetOp input"
Stack trace:
1    0x00007fe52a72fa10 gpos::CException::Raise + 256
2    0x00007fe52c9b096c gpopt::CLogicalSetOp::DeriveOutputColumns + 180
3    0x00007fe52c910167 gpopt::CDrvdPropRelational::DeriveOutputColumns + 109
4    0x00007fe52c90f452 gpopt::CDrvdPropRelational::Derive + 60
5    0x00007fe52c96e40c gpopt::CExpression::PdpDerive + 684
6    0x00000000004e7845 gpopt::CExpressionTest::EresUnittest_InvalidSetOp + 1267
7    0x00007fe52a746905 gpos::CUnittest::EresExecTest + 81
8    0x00007fe52a746b4e gpos::CUnittest::EresExecute + 118
9    0x00000000004e1d7e gpopt::CExpressionTest::EresUnittest + 398
10   0x00007fe52a746905 gpos::CUnittest::EresExecTest + 81
11   0x00007fe52a746b4e gpos::CUnittest::EresExecute + 118
12   0x00007fe52a746e80 gpos::CUnittest::Driver + 192
13   0x0000000000475e79 <symbol not found> + 4677241
14   0x00007fe52a7422e6 gpos::CTask::Execute + 180
15   0x00007fe52a744ad1 gpos::CWorker::Execute + 187
16   0x00007fe52a74086a gpos::CAutoTaskProxy::Execute + 202
17   0x00007fe52a727b12 gpos_exec + 773
",
2024-12-04 16:20:13:444791 CST,THD000,TRACE,"timer:CExpressionTest::EresUnittest_InvalidSetOp: 6ms",
2024-12-04 16:20:13:444801 CST,THD000,TRACE,"Unittest CExpressionTest::EresUnittest_InvalidSetOp...OK.",
2024-12-04 16:20:13:444886 CST,THD000,TRACE,"timer:CExpressionTest: 1038ms",
2024-12-04 16:20:13:444894 CST,THD000,TRACE,"Unittest CExpressionTest...*** FAILED ***.",
2024-12-04 16:20:13:445007 CST,THD000,TRACE,"timer:total test run time: 1039ms",
2024-12-04 16:20:13:445014 CST,THD000,TRACE,"Tests succeeded: 0",
2024-12-04 16:20:13:445021 CST,THD000,TRACE,"Tests failed:    1",

I haven't analyzed this part of tests in detail, but the examples given here, seem like minidump not match or no updated? maybe we can double check the minidump in GP(just a suggestion)....