{"action":"created","issue":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/6254","repository_url":"https://api.github.com/repos/greenplum-db/gpdb","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/6254/labels{/name}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/6254/comments","events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/6254/events","html_url":"https://github.com/greenplum-db/gpdb/issues/6254","id":381366194,"node_id":"MDU6SXNzdWUzODEzNjYxOTQ=","number":6254,"title":"Orca assertion ","user":{"login":"hlinnaka","id":191602,"node_id":"MDQ6VXNlcjE5MTYwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/191602?v=4","gravatar_id":"","url":"https://api.github.com/users/hlinnaka","html_url":"https://github.com/hlinnaka","followers_url":"https://api.github.com/users/hlinnaka/followers","following_url":"https://api.github.com/users/hlinnaka/following{/other_user}","gists_url":"https://api.github.com/users/hlinnaka/gists{/gist_id}","starred_url":"https://api.github.com/users/hlinnaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlinnaka/subscriptions","organizations_url":"https://api.github.com/users/hlinnaka/orgs","repos_url":"https://api.github.com/users/hlinnaka/repos","events_url":"https://api.github.com/users/hlinnaka/events{/privacy}","received_events_url":"https://api.github.com/users/hlinnaka/received_events","type":"User","site_admin":false},"labels":[{"id":604585745,"node_id":"MDU6TGFiZWw2MDQ1ODU3NDU=","url":"https://api.github.com/repos/greenplum-db/gpdb/labels/GPORCA","name":"GPORCA","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-11-15T22:26:49Z","updated_at":"2018-11-23T07:39:57Z","closed_at":null,"author_association":"MEMBER","body":"With this query:\r\n```\r\nset optimizer=on;\r\ncreate temporary table a as select generate_series(1, 5) as i distributed by (i);\r\ncreate temporary table b as select generate_series(2, 6) as i distributed by (i);\r\ncreate temporary table c as select generate_series(3, 7) as i distributed by (i);\r\nselect * from a full join b on (a.i=b.i) full join c on (b.i=c.i);\r\n```\r\n\r\nOrca is falling back to planner, and there's this in the log:\r\n\r\n```\r\n2018-11-16 00:18:10:148584 EET,THD000,ERROR,\"\"/home/heikki/gpdb/optimizer-main/libnaucrates/src/statistics/CJoinStatsProcessor.cpp:482: Failed assertion: COperator::EopLogicalLeftOuterJoin == op_id || COperator::EopLogicalInnerJoin == op_id || COperator::EopLogicalNAryJoin == op_id\r\nStack trace:\r\n1    0x00007fd12ea9ad38 gpos::CException::Raise + 252\r\n2    0x00007fd12f0bd89e gpnaucrates::CJoinStatsProcessor::DeriveJoinStats + 586\r\n3    0x00007fd12f575805 gpopt::CLogicalJoin::PstatsDerive + 47\r\n4    0x00007fd12f54dd23 gpopt::CExpressionHandle::DeriveRootStats + 427\r\n5    0x00007fd12f54e189 gpopt::CExpressionHandle::DeriveStats + 1033\r\n6    0x00007fd12f544099 gpopt::CExpression::PstatsDerive + 861\r\n7    0x00007fd12f54dff4 gpopt::CExpressionHandle::DeriveStats + 628\r\n8    0x00007fd12f544099 gpopt::CExpression::PstatsDerive + 861\r\n9    0x00007fd12f4b39b9 gpopt::CCTEInfo::InitDefaultStats + 157\r\n10   0x00007fd12f4b360f gpopt::CCTEInfo::PexprPreprocessCTEProducer + 293\r\n11   0x00007fd12f4b3672 gpopt::CCTEInfo::AddCTEProducer + 38\r\n12   0x00007fd12f6bfe96 gpopt::CXformUtils::PexprAddCTEProducer + 278\r\n13   0x00007fd12f65ca85 gpopt::CXformExpandFullOuterJoin::Transform + 495\r\n14   0x00007fd12f5e0cea gpopt::CGroupExpression::Transform + 818\r\n15   0x00007fd12f5fd867 gpopt::CJobTransformation::EevtTransform + 189\r\n16   0x00007fd12f5fddf7 gpopt::CJobStateMachine + 351\r\n17   0x00007fd12f5fd97a gpopt::CJobTransformation::FExecute + 116\r\n18   0x00007fd12f604c5b gpopt::CScheduler::FExecute + 77\r\n19   0x00007fd12f60449f gpopt::CScheduler::ExecuteJobs + 127\r\n20   0x00007fd12f60436a gpopt::CScheduler::ProcessJobs + 48\r\n21   0x00007fd12f604332 gpopt::CScheduler::Run + 50\r\n22   0x00007fd12f51c25c gpopt::CEngine::MainThreadOptimize + 868\r\n23   0x00007fd12f51bdbf gpopt::CEngine::Optimize + 151\r\n24   0x00007fd12f5cd28f gpopt::COptimizer::PexprOptimize + 105\r\n25   0x00007fd12f5ccc5e gpopt::COptimizer::PdxlnOptimize + 1294\r\n26   0x00005637d6e65ca6 COptTasks::OptimizeTask + 950\r\n27   0x00007fd12eab4fbb gpos::CTask::Execute + 183\r\n28   0x00007fd12eab99f5 gpos::CWorker::Execute + 199\r\n29   0x00007fd12eab3325 gpos::CAutoTaskProxy::Execute + 287\r\n30   0x00007fd12ea90d3b gpos_exec + 800\r\n\"\",\",,,,,,\"select * from a full join b on (a.i=b.i) full join c on (b.i=c.i);\",0,,\"COptTasks.cpp\",591,\r\n2018-11-16 00:18:10.149226 EET,\"heikki\",\"postgres\",p28412,th868813760,\"[local]\",,2018-11-16 00:17:58 EET,0,con74,cmd19,seg-1,,dx9,,sx1,\"LOG\",\"00000\",\"Planner produced plan :1\",,,,,,\"select * from a full join b on (a.i=b.i) full join c on (b.i=c.i);\",0,,\"orca.c\",60,\r\n```\r\n\r\nThis only happens with a debug-enabled ORCA build."},"comment":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/comments/441171561","html_url":"https://github.com/greenplum-db/gpdb/issues/6254#issuecomment-441171561","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/6254","id":441171561,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTE3MTU2MQ==","user":{"login":"vraghavan78","id":12649877,"node_id":"MDQ6VXNlcjEyNjQ5ODc3","avatar_url":"https://avatars1.githubusercontent.com/u/12649877?v=4","gravatar_id":"","url":"https://api.github.com/users/vraghavan78","html_url":"https://github.com/vraghavan78","followers_url":"https://api.github.com/users/vraghavan78/followers","following_url":"https://api.github.com/users/vraghavan78/following{/other_user}","gists_url":"https://api.github.com/users/vraghavan78/gists{/gist_id}","starred_url":"https://api.github.com/users/vraghavan78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vraghavan78/subscriptions","organizations_url":"https://api.github.com/users/vraghavan78/orgs","repos_url":"https://api.github.com/users/vraghavan78/repos","events_url":"https://api.github.com/users/vraghavan78/events{/privacy}","received_events_url":"https://api.github.com/users/vraghavan78/received_events","type":"User","site_admin":false},"created_at":"2018-11-23T07:39:57Z","updated_at":"2018-11-23T07:39:57Z","author_association":"MEMBER","body":"@hlinnaka I agree. We wanted to implement the FOJ, just did not get around to it."}}
{"actor":{"display_login":"vraghavan78"}}