提交 de0a7729 编写于 作者: B Bhuvnesh Chaudhary 提交者: Bhuvnesh

Handle NULL while deriving propagation expression [#143443847]

While constructing the propagation expression in case of queries
involving default list partitions which have indexes, we ended
up with NULLs crashing the database.

Currently, we fallback to planner. But we need to handle it in a
better way in future.
Signed-off-by: NDhanashree Kashid <dkashid@pivotal.io>
上级 2567ef1c
......@@ -564,7 +564,7 @@ CTranslatorExprToDXLUtils::UlPartKeyLevel
// CTranslatorExprToDXLUtils::PdxlnPartialScanTestRange
//
// @doc:
// Construct a test expression for the given range
// Construct a test expression for the given range or list
// based part constraint
//
//---------------------------------------------------------------------------
......@@ -589,6 +589,17 @@ CTranslatorExprToDXLUtils::PdxlnPartialScanTestRange
else // list partition
{
IDatum *pdatum = prng->PdatumLeft();
if (pdatum == NULL)
{
// TODO: In case of default partitions, we end up with NULL for Left and Right Datum.
// Currently we fallback and should handle it better in future.
GPOS_RAISE
(
gpdxl::ExmaDXL,
gpdxl::ExmiExpr2DXLUnsupportedFeature,
GPOS_WSZ_LIT("Queries over default list partition that have indexes")
);
}
GPOS_ASSERT(pdatum->FMatch(prng->PdatumRight()));
CDXLDatum *pdxldatum = Pdxldatum(pmp, pmda, pdatum);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册