From ad1195a1a718037280c5f7205a7e5be7574e6e9f Mon Sep 17 00:00:00 2001 From: Venkatesh Raghavan Date: Tue, 20 Feb 2018 11:36:08 -0800 Subject: [PATCH] Clean up FIXME added after WINDOW merge These underlying issues where resolved in the following PRs that were merged. The fixmes where not removed. https://github.com/greenplum-db/gpdb/pull/4174/files https://github.com/greenplum-db/gporca/pull/263 --- .../translate/CTranslatorDXLToScalar.cpp | 16 --------- .../translate/CTranslatorRelcacheToDXL.cpp | 33 ------------------- 2 files changed, 49 deletions(-) diff --git a/src/backend/gpopt/translate/CTranslatorDXLToScalar.cpp b/src/backend/gpopt/translate/CTranslatorDXLToScalar.cpp index 21809e9228..1fc541901b 100644 --- a/src/backend/gpopt/translate/CTranslatorDXLToScalar.cpp +++ b/src/backend/gpopt/translate/CTranslatorDXLToScalar.cpp @@ -547,22 +547,6 @@ CTranslatorDXLToScalar::PwindowrefFromDXLNodeScWindowRef WindowFunc *pwindowfunc = MakeNode(WindowFunc); pwindowfunc->winfnoid = CMDIdGPDB::PmdidConvert(pdxlop->PmdidFunc())->OidObjectId(); - // GPDB_84_MERGE_FIXME: The OIDS of a few built-in window - // functions have been hard-coded in ORCA. But the OIDs - // were changed when we merged the upstream window function - // implementation, to match the upstream OIDs. Map the old - // OIDs to the upstream ones. - if (pwindowfunc->winfnoid == 7000) // ROW_NUMBER() - pwindowfunc->winfnoid = 3100; - if (pwindowfunc->winfnoid == 7002) // DENSE_RANK() - pwindowfunc->winfnoid = 3102; - if (pwindowfunc->winfnoid == 7003) // PERCENT_RANK() - pwindowfunc->winfnoid = 3103; - if (pwindowfunc->winfnoid == 7004) // CUME_DIST() - pwindowfunc->winfnoid = 3104; - if (pwindowfunc->winfnoid == 7005) // NTILE(int4) - pwindowfunc->winfnoid = 3105; - pwindowfunc->windistinct = pdxlop->FDistinct(); pwindowfunc->location = -1; pwindowfunc->winref = pdxlop->UlWinSpecPos() + 1; diff --git a/src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp b/src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp index 4204e55076..0393c5e305 100644 --- a/src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp +++ b/src/backend/gpopt/translate/CTranslatorRelcacheToDXL.cpp @@ -164,22 +164,6 @@ CTranslatorRelcacheToDXL::PimdobjGPDB OID oid = CMDIdGPDB::PmdidConvert(pmdid)->OidObjectId(); - // GPDB_84_MERGE_FIXME: The OIDS of a few built-in window - // functions have been hard-coded in ORCA. But the OIDs - // were changed when we merged the upstream window function - // implementation, to match the upstream OIDs. Map the old - // OIDs to the upstream ones. - if (oid == 7000) // ROW_NUMBER() - oid = 3100; - if (oid == 7002) // DENSE_RANK() - oid = 3102; - if (oid == 7003) // PERCENT_RANK() - oid = 3103; - if (oid == 7004) // CUME_DIST() - oid = 3104; - if (oid == 7005) // NTILE(int4) - oid = 3105; - GPOS_ASSERT(0 != oid); // find out what type of object this oid stands for @@ -1836,23 +1820,6 @@ CTranslatorRelcacheToDXL::Pmdfunc { OID oidFunc = CMDIdGPDB::PmdidConvert(pmdid)->OidObjectId(); - - // GPDB_84_MERGE_FIXME: The OIDS of a few built-in window - // functions have been hard-coded in ORCA. But the OIDs - // were changed when we merged the upstream window function - // implementation, to match the upstream OIDs. Map the old - // OIDs to the upstream ones. - if (oidFunc == 7000) // ROW_NUMBER() - oidFunc = 3100; - if (oidFunc == 7002) // DENSE_RANK() - oidFunc = 3102; - if (oidFunc == 7003) // PERCENT_RANK() - oidFunc = 3103; - if (oidFunc == 7004) // CUME_DIST() - oidFunc = 3104; - if (oidFunc == 7005) // NTILE(int4) - oidFunc = 3105; - GPOS_ASSERT(InvalidOid != oidFunc); // get func name -- GitLab