{"push_id":1912890554,"size":3,"distinct_size":3,"ref":"refs/heads/master","head":"ef45755807e5075ad85adc4560689dfdac99eb3f","before":"ee5ef334c8a311d162df2c642ee159d6c9dfd7e8","commits":[{"sha":"5bcd44f6518fd80549c7dc3dd51d20562bdd2d97","author":{"name":"Dhanashree Kashid","email":"a7113a6f4ccd27890471715685a45013ab2c9271@pivotal.io"},"message":"Add new Array Coerce Cast Metadata object\n\nCurrently executor crashes for following query with ORCA ON :\n```\nCREATE TABLE FOO(a\ninteger NOT NULL, b double precision[]); SELECT b FROM foo UNION ALL SELECT\nARRAY[90, 90] as Cont_features;\n```\n\nIn this query, we are appending an integer array (ARRAY[90, 90]) to a double\nprecision array (foo.b) and hence we need to apply a cast on ARRAY[90, 90] to\ngenerate ARRAY[90, 90]::double precision[].\nIn gpdb5 there is not direct function available that can cast array of any type\nto array of any other type. So in relcache to dxl translator we look into the\narray elements and get their type and try to find a cast function for them.\nFor this query, source type is 23 (integer) and dest type is 701 (double precision)\n and we try to find if we have a conversion function for 23 -> 701.\nSince that is available we send that function to ORCA as follows:\n```\n<dxl:MDCast\nMdid=\"3.1007.1.0;1022.1.0\" Name=\"float8\" BinaryCoercible=\"false\"\nSourceTypeId=\"0.1007.1.0\" DestinationTypeId=\"0.1022.1.0\"\nCastFuncId=\"0.316.1.0\"/>\n```\nHere we are misinforming ORCA by specifying that function with id 316 is available\nto convert type 1007 (integer array) to 1022 (double precision) array.\nHowever Function id 316 is simple int4 to float8 conversion function and it CAN NOT\nconvert an array of int4 to array of double precision.\nORCA generates a plan using this function but executor crashes while executing this\nfunction because this function can not handle arrays.\n\nThis commit adds a new ArrayCoerceCast MetaData object which will be constructed\nwhen we need to convert an array of one type to another; instead of constructing\nCast Metadata.\n\n`CMDArrayCoerceCastGPDB` extends `CMDCastGPDB` in that it includes necessary information\nto generate `CScalarArrayCoerceExpr`.\n\nIn Relcache Translator on GPDB, we will construct an object of `CMDArrayCoerceCastGPDB`\ninstead of `CMDCastGPDB` depending on the coercion path determined by `FCastFunc`.\n\nAdded relevant test cases.\n\nRef [#149524459]\n\nSigned-off-by: Ekta Khanna <ekhanna@pivotal.io>","distinct":true,"url":"https://api.github.com/repos/mahak/gporca/commits/5bcd44f6518fd80549c7dc3dd51d20562bdd2d97"},{"sha":"10e91f99452763d9513b8d3ea2fec41bc4fe867e","author":{"name":"Ekta Khanna","email":"4c9e1b2261913655be26cd5cea6e7d4079f6437b@pivotal.io"},"message":"Refactoring cast functions into `CUtilsCasts`\n\nThis commit creates a new file `CCastUtils.cpp` which maintains all the\ncast functions.\n\nThe following functions are moved from `CUtils.cpp` to `CCastUtils.cpp`:\n```\n* BOOL FBinaryCoercibleCastedScId(CExpression *pexpr, CColRef *pcr)\n* BOOL FBinaryCoercibleCastedScId(CExpression *pexpr)\n* const CColRef *PcrExtractFromScIdOrCastScId(CExpression *pexpr)\n* CExpression *PexprCast( IMemoryPool *pmp, CMDAccessor *pmda, const\nCColRef *pcr, IMDId *pmdidDest)\n* BOOL FBinaryCoercibleCast(CExpression *pexpr)\n* CExpression *PexprWithoutBinaryCoercibleCasts(CExpression *pexpr)\n```\n\nThe following functions are moved from `CPredicateUtils.cpp` to\n`CCastUtils.cpp`:\n\n```\n* DrgPexpr *PdrgpexprCastEquality(IMemoryPool *pmp, CExpression *pexpr)\n* CExpression *PexprAddCast(IMemoryPool *pmp, CExpression *pexprPred)\n* CExpression *PexprCast(IMemoryPool *pmp, CMDAccessor *pmda,\nCExpression *pexpr, IMDId *pmdidDest)\n```\n\nSigned-off-by: Dhanashree Kashid <dkashid@pivotal.io>\nSigned-off-by: Bhuvnesh Chaudhary <bchaudhary@pivotal.io>","distinct":true,"url":"https://api.github.com/repos/mahak/gporca/commits/10e91f99452763d9513b8d3ea2fec41bc4fe867e"},{"sha":"ef45755807e5075ad85adc4560689dfdac99eb3f","author":{"name":"Ekta Khanna","email":"4c9e1b2261913655be26cd5cea6e7d4079f6437b@pivotal.io"},"message":"Bump ORCA version to 2.40.0\n\nSigned-off-by: Bhuvnesh Chaudhary <bchaudhary@pivotal.io>","distinct":true,"url":"https://api.github.com/repos/mahak/gporca/commits/ef45755807e5075ad85adc4560689dfdac99eb3f"}]}
{"actor":{"display_login":"mahak"}}