Repository: incubator-trafodion Updated Branches: refs/heads/master 6400ecb96 -> f400093c7
[TRAFODION-2382] No plan produced when joining two TMUDFs A simple join query resulted in no plan. One of the reasons is the way we handle operator types for TMUDFs. Changed this so that the operator type indicates the arity of the operator. Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/91a809b1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/91a809b1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/91a809b1 Branch: refs/heads/master Commit: 91a809b1b7494476e1fb34696ff6496c3b492015 Parents: c0e92d8 Author: Hans Zeller <[email protected]> Authored: Tue Dec 20 22:23:52 2016 +0000 Committer: Hans Zeller <[email protected]> Committed: Tue Dec 20 22:23:52 2016 +0000 ---------------------------------------------------------------------- core/sql/common/ExprNode.cpp | 19 ++++- core/sql/common/OperTypeEnum.h | 4 +- core/sql/generator/GenShape.cpp | 4 +- core/sql/optimizer/BindRelExpr.cpp | 3 +- core/sql/optimizer/ImplRule.cpp | 17 +++- core/sql/optimizer/RelRoutine.cpp | 144 +++++++++++++++++++------------- core/sql/optimizer/RelRoutine.h | 77 ++++++++++------- core/sql/parser/sqlparser.y | 5 +- 8 files changed, 170 insertions(+), 103 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/91a809b1/core/sql/common/ExprNode.cpp ---------------------------------------------------------------------- diff --git a/core/sql/common/ExprNode.cpp b/core/sql/common/ExprNode.cpp index e184e5d..d8ba76f 100644 --- a/core/sql/common/ExprNode.cpp +++ b/core/sql/common/ExprNode.cpp @@ -112,6 +112,7 @@ NABoolean OperatorType::match(OperatorTypeEnum wildcard) const case REL_LEAF_UPDATE: case REL_LEAF_DELETE: case REL_ISOLATED_SCALAR_UDF: + case REL_LEAF_TABLE_MAPPING_UDF: case REL_HIVE_INSERT: case REL_HBASE_INSERT: case REL_SP_PROXY: @@ -159,6 +160,7 @@ NABoolean OperatorType::match(OperatorTypeEnum wildcard) const case REL_SEQUENCE: case REL_SAMPLE: + case REL_UNARY_TABLE_MAPPING_UDF: return TRUE; default: return FALSE; @@ -175,6 +177,12 @@ NABoolean OperatorType::match(OperatorTypeEnum wildcard) const case REL_EXPLAIN: case REL_STATISTICS: case REL_CALLSP: + case REL_LEAF_TABLE_MAPPING_UDF: + case REL_UNARY_TABLE_MAPPING_UDF: + case REL_BINARY_TABLE_MAPPING_UDF: + case REL_TABLE_MAPPING_BUILTIN_LOG_READER: + case REL_TABLE_MAPPING_BUILTIN_TIMESERIES: + case REL_TABLE_MAPPING_BUILTIN_JDBC: return TRUE; default: return FALSE; @@ -361,6 +369,7 @@ NABoolean OperatorType::match(OperatorTypeEnum wildcard) const case REL_MERGE_UNION: case REL_INTERSECT: case REL_EXCEPT: + case REL_BINARY_TABLE_MAPPING_UDF: return TRUE; default: return FALSE; @@ -687,7 +696,9 @@ NABoolean OperatorType::match(OperatorTypeEnum wildcard) const case REL_ANY_TABLE_MAPPING_UDF: switch (op_) { - case REL_TABLE_MAPPING_UDF: + case REL_LEAF_TABLE_MAPPING_UDF: + case REL_UNARY_TABLE_MAPPING_UDF: + case REL_BINARY_TABLE_MAPPING_UDF: case REL_TABLE_MAPPING_BUILTIN_LOG_READER: case REL_TABLE_MAPPING_BUILTIN_TIMESERIES: case REL_TABLE_MAPPING_BUILTIN_JDBC: @@ -699,7 +710,7 @@ NABoolean OperatorType::match(OperatorTypeEnum wildcard) const case REL_ANY_LEAF_TABLE_MAPPING_UDF: switch (op_) { - case REL_TABLE_MAPPING_UDF: + case REL_LEAF_TABLE_MAPPING_UDF: case REL_TABLE_MAPPING_BUILTIN_LOG_READER: case REL_TABLE_MAPPING_BUILTIN_JDBC: return TRUE; @@ -710,7 +721,7 @@ NABoolean OperatorType::match(OperatorTypeEnum wildcard) const case REL_ANY_UNARY_TABLE_MAPPING_UDF: switch (op_) { - case REL_TABLE_MAPPING_UDF: + case REL_UNARY_TABLE_MAPPING_UDF: case REL_TABLE_MAPPING_BUILTIN_TIMESERIES: return TRUE; default: @@ -720,7 +731,7 @@ NABoolean OperatorType::match(OperatorTypeEnum wildcard) const case REL_ANY_BINARY_TABLE_MAPPING_UDF: switch (op_) { - case REL_TABLE_MAPPING_UDF: + case REL_BINARY_TABLE_MAPPING_UDF: return TRUE; default: return FALSE; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/91a809b1/core/sql/common/OperTypeEnum.h ---------------------------------------------------------------------- diff --git a/core/sql/common/OperTypeEnum.h b/core/sql/common/OperTypeEnum.h index 4ff607b..4e29496 100644 --- a/core/sql/common/OperTypeEnum.h +++ b/core/sql/common/OperTypeEnum.h @@ -89,7 +89,9 @@ enum OperatorTypeEnum { REL_TABLE_VALUED_FUNCTION, REL_BUILTIN_TABLE_VALUED_FUNCTION, REL_TABLE_VALUED_UDF, - REL_TABLE_MAPPING_UDF, + REL_LEAF_TABLE_MAPPING_UDF, + REL_UNARY_TABLE_MAPPING_UDF, + REL_BINARY_TABLE_MAPPING_UDF, REL_TABLE_MAPPING_BUILTIN_LOG_READER, REL_TABLE_MAPPING_BUILTIN_TIMESERIES, REL_TABLE_MAPPING_BUILTIN_JDBC, http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/91a809b1/core/sql/generator/GenShape.cpp ---------------------------------------------------------------------- diff --git a/core/sql/generator/GenShape.cpp b/core/sql/generator/GenShape.cpp index 7cefe24..420d9a2 100644 --- a/core/sql/generator/GenShape.cpp +++ b/core/sql/generator/GenShape.cpp @@ -124,7 +124,9 @@ short RelExpr::generateShape(CollHeap * c, char * buf, NAString * shapeStr) } break; - case REL_TABLE_MAPPING_UDF: + case REL_LEAF_TABLE_MAPPING_UDF: + case REL_UNARY_TABLE_MAPPING_UDF: + case REL_BINARY_TABLE_MAPPING_UDF: case REL_TABLE_MAPPING_BUILTIN_LOG_READER: case REL_TABLE_MAPPING_BUILTIN_TIMESERIES: case REL_TABLE_MAPPING_BUILTIN_JDBC: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/91a809b1/core/sql/optimizer/BindRelExpr.cpp ---------------------------------------------------------------------- diff --git a/core/sql/optimizer/BindRelExpr.cpp b/core/sql/optimizer/BindRelExpr.cpp index 2bc18b5..d51624d 100644 --- a/core/sql/optimizer/BindRelExpr.cpp +++ b/core/sql/optimizer/BindRelExpr.cpp @@ -17045,7 +17045,7 @@ RelExpr *TableMappingUDF::bindNode(BindWA *bindWA) OperatorTypeEnum opType = PredefinedTableMappingFunction::nameIsAPredefinedTMF(tmfuncName); - if (opType != REL_TABLE_MAPPING_UDF) + if (opType != REL_ANY_TABLE_MAPPING_UDF) { // yes, this is a predefined TMUDF PredefinedTableMappingFunction *result; @@ -17058,6 +17058,7 @@ RelExpr *TableMappingUDF::bindNode(BindWA *bindWA) // create a new RelExpr result = new(bindWA->wHeap()) PredefinedTableMappingFunction( + getArity(), tmfuncName, const_cast<ItemExpr *>(getProcAllParamsTree()), opType); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/91a809b1/core/sql/optimizer/ImplRule.cpp ---------------------------------------------------------------------- diff --git a/core/sql/optimizer/ImplRule.cpp b/core/sql/optimizer/ImplRule.cpp index a28a8f6..6a0fafc 100644 --- a/core/sql/optimizer/ImplRule.cpp +++ b/core/sql/optimizer/ImplRule.cpp @@ -5247,7 +5247,7 @@ RelExpr * PhysicalTMUDFRule::nextSubstitute(RelExpr * before, // Simply copy the contents of the TableMappingUDF from the before pattern. PhysicalTableMappingUDF *result = new (CmpCommon::statementHeap()) - PhysicalTableMappingUDF(CmpCommon::statementHeap()); + PhysicalTableMappingUDF(before->getArity(), CmpCommon::statementHeap()); bef->TableMappingUDF::copyTopNode(result, CmpCommon::statementHeap()); // now set the group attributes of the result's top node @@ -5260,7 +5260,20 @@ RelExpr * PhysicalTMUDFRule::nextSubstitute(RelExpr * before, NABoolean PhysicalTMUDFRule::canMatchPattern (const RelExpr *pattern) const { - return OperatorType(REL_TABLE_MAPPING_UDF).match(pattern->getOperator()); + switch (pattern->getOperatorType()) + { + case REL_ANY_TABLE_MAPPING_UDF: + case REL_ANY_LEAF_TABLE_MAPPING_UDF: + case REL_ANY_UNARY_TABLE_MAPPING_UDF: + case REL_ANY_BINARY_TABLE_MAPPING_UDF: + return TRUE; + + default: + if (pattern->getOperator().isWildcard()) + return FALSE; + else + return pattern->getOperator().match(REL_ANY_TABLE_MAPPING_UDF); + } } PhysicalFastExtractRule::~PhysicalFastExtractRule() {} // LCOV_EXCL_LINE http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/91a809b1/core/sql/optimizer/RelRoutine.cpp ---------------------------------------------------------------------- diff --git a/core/sql/optimizer/RelRoutine.cpp b/core/sql/optimizer/RelRoutine.cpp index 1fdec10..df415cd 100644 --- a/core/sql/optimizer/RelRoutine.cpp +++ b/core/sql/optimizer/RelRoutine.cpp @@ -335,6 +335,7 @@ TableMappingUDF::TableMappingUDF(const TableMappingUDF & other) constParamBuffer_ = other.constParamBuffer_; // shallow copy is ok constParamBufferLen_ = other.constParamBufferLen_; udfOutputToChildInputMap_ = other.udfOutputToChildInputMap_; + isNormalized_ = other.isNormalized_; } //! TableMappingUDF::~TableMappingUDF Destructor @@ -352,9 +353,9 @@ RelExpr * TableMappingUDF::copyTopNode(RelExpr *derivedNode, if (derivedNode == NULL) { - result = new (outHeap) TableMappingUDF(NULL, - getOperatorType(), - outHeap); + result = new (outHeap) TableMappingUDF(getArity(), + NULL, + outHeap); } else result = (TableMappingUDF *) derivedNode; @@ -376,6 +377,7 @@ RelExpr * TableMappingUDF::copyTopNode(RelExpr *derivedNode, result->constParamBufferLen_ = constParamBufferLen_; result->predsEvaluatedByUDF_ = predsEvaluatedByUDF_; result->udfOutputToChildInputMap_ = udfOutputToChildInputMap_; + result->isNormalized_ = isNormalized_; return TableValuedFunction::copyTopNode(result, outHeap); } @@ -505,60 +507,82 @@ void TableMappingUDF::pushdownCoveredExpr( const ValueIdSet *nonPredNonOutputExprOnOperator, Lng32 childId) { - ValueIdSet exprOnParent; - ValueIdSet predsToPushDown; - // At this point, we have determined the characteristic outputs - // of the TableMappingUDF and a set of selection predicates to - // be evaluated on the result of the UDF. - - // Call the UDF code to determine which child outputs we should - // require as child characteristic outputs and what to do with the - // selection predicates - - // The logic below only works if we push preds to all children - // at the same time. - CMPASSERT(childId == -MAX_REL_ARITY); - - // interact with the UDF - NABoolean status = dllInteraction_->describeDataflow( - this, - exprOnParent, - selectionPred(), - predsEvaluatedByUDF_, - predsToPushDown); - // no good way to return failure, error will be detected - // at the end of the normalization phase - - // rewrite the predicates to be pushed down in terms - // of the values produced by the table-valued inputs - ValueIdSet childPredsToPushDown; - udfOutputToChildInputMap_.rewriteValueIdSetDown( - predsToPushDown, childPredsToPushDown); - - // remaining selection predicates stay with the parent - exprOnParent += selectionPred(); - if(nonPredNonOutputExprOnOperator) - exprOnParent += *nonPredNonOutputExprOnOperator; - - RelExpr::pushdownCoveredExpr(outputExprOnOperator, - newExternalInputs, - childPredsToPushDown, - &exprOnParent, - childId); - - // apply any leftover predicates back to the parent, but need - // to rewrite them in terms of the parent first - if (!childPredsToPushDown.isEmpty()) + if (!isNormalized_) { - predsToPushDown.clear(); - // Map the leftovers back to the language of out outputs. - // Note that since we rewrote these values on the way down, - // a simple mapping will suffice when going back up, as they - // are recorded already in the map table. - udfOutputToChildInputMap_.mapValueIdSetUp(predsToPushDown, - childPredsToPushDown); - selectionPred() += predsToPushDown; + ValueIdSet exprOnParent; + ValueIdSet predsToPushDown; + // At this point, we have determined the characteristic outputs + // of the TableMappingUDF and a set of selection predicates to + // be evaluated on the result of the UDF. + + // Call the UDF code to determine which child outputs we should + // require as child characteristic outputs and what to do with the + // selection predicates + + // The logic below only works if we push preds to all children + // at the same time. + CMPASSERT(childId == -MAX_REL_ARITY); + + // interact with the UDF + NABoolean status = dllInteraction_->describeDataflow( + this, + exprOnParent, + selectionPred(), + predsEvaluatedByUDF_, + predsToPushDown); + // no good way to return failure, error will be detected + // at the end of the normalization phase + + // rewrite the predicates to be pushed down in terms + // of the values produced by the table-valued inputs + ValueIdSet childPredsToPushDown; + udfOutputToChildInputMap_.rewriteValueIdSetDown( + predsToPushDown, childPredsToPushDown); + + // remaining selection predicates stay with the parent + exprOnParent += selectionPred(); + if(nonPredNonOutputExprOnOperator) + exprOnParent += *nonPredNonOutputExprOnOperator; + + RelExpr::pushdownCoveredExpr(outputExprOnOperator, + newExternalInputs, + childPredsToPushDown, + &exprOnParent, + childId); + + // apply any leftover predicates back to the parent, but need + // to rewrite them in terms of the parent first + if (!childPredsToPushDown.isEmpty()) + { + predsToPushDown.clear(); + // Map the leftovers back to the language of out outputs. + // Note that since we rewrote these values on the way down, + // a simple mapping will suffice when going back up, as they + // are recorded already in the map table. + udfOutputToChildInputMap_.mapValueIdSetUp(predsToPushDown, + childPredsToPushDown); + selectionPred() += predsToPushDown; + } + // indicate that we did this step and recorded needed columns + // and pushed predicate in the InvocationInfo, don't change this + // information from now on (unless recording such changes in + // UDRPlanInfo) + isNormalized_ = TRUE; } + // else + // If this is past the normalizer UDF interface call, + // pushdownCoveredExpr() has already been called in the + // normalizer. We cannot push down predicates and/or eliminate + // columns in this phase, because the UDR has already been told + // which columns and predicates we need. Also, this situation could + // apply only to one plan alternative and the UDRInvocationInfo + // object that records the predicates and columns is shared among + // all the alternatives. If we want to do such pushdown in the + // future (and this would be very desirable, something like a + // "routine join"), then we'll have to record the pushed down + // predicates and eliminated columns in the UDRPlanInfo object and + // we'll have to add another compiler interface method for the UDR + // writer. }; @@ -1007,11 +1031,12 @@ NARoutine * TableMappingUDF::getRoutineMetadata( // ----------------------------------------------------------------------- PredefinedTableMappingFunction::PredefinedTableMappingFunction( + int arity, const CorrName &name, ItemExpr *params, OperatorTypeEnum otype, CollHeap *oHeap) : - TableMappingUDF(name, params, otype, oHeap) + TableMappingUDF(name, params, arity, otype, oHeap) {} PredefinedTableMappingFunction::~PredefinedTableMappingFunction() @@ -1027,7 +1052,7 @@ OperatorTypeEnum PredefinedTableMappingFunction::nameIsAPredefinedTMF(const Corr const NAString &funcName = qualName.getObjectName(); if (! qualName.getSchemaName().isNull()) - return REL_TABLE_MAPPING_UDF; + return REL_ANY_TABLE_MAPPING_UDF; if (funcName == "EVENT_LOG_READER") return REL_TABLE_MAPPING_BUILTIN_LOG_READER; @@ -1037,7 +1062,7 @@ OperatorTypeEnum PredefinedTableMappingFunction::nameIsAPredefinedTMF(const Corr return REL_TABLE_MAPPING_BUILTIN_JDBC; else // none of the built-in names matched, so it must be a UDF - return REL_TABLE_MAPPING_UDF; + return REL_ANY_TABLE_MAPPING_UDF; } const NAString PredefinedTableMappingFunction::getText() const @@ -1070,6 +1095,7 @@ RelExpr * PredefinedTableMappingFunction::copyTopNode(RelExpr *derivedNode, if (derivedNode == NULL) result = new(outHeap) PredefinedTableMappingFunction( + getArity(), getUserTableName(), NULL, // params get copied by parent classes getOperatorType(), @@ -1156,7 +1182,7 @@ RelExpr * PhysicalTableMappingUDF::copyTopNode(RelExpr *derivedNode, PhysicalTableMappingUDF *result; if (derivedNode == NULL) - result = new(outHeap) PhysicalTableMappingUDF(outHeap); + result = new(outHeap) PhysicalTableMappingUDF(getArity(), outHeap); else result = (PhysicalTableMappingUDF *) derivedNode; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/91a809b1/core/sql/optimizer/RelRoutine.h ---------------------------------------------------------------------- diff --git a/core/sql/optimizer/RelRoutine.h b/core/sql/optimizer/RelRoutine.h index 438d01e..ca63321 100644 --- a/core/sql/optimizer/RelRoutine.h +++ b/core/sql/optimizer/RelRoutine.h @@ -688,37 +688,44 @@ public : // constructors //! TableMappingUDF Constructor - TableMappingUDF(ItemExpr *params = NULL, - OperatorTypeEnum otype = REL_TABLE_MAPPING_UDF, - CollHeap *oHeap = CmpCommon::statementHeap()) - : TableValuedFunction(params, otype, oHeap), - childInfo_(oHeap), - scalarInputParams_(NULL), - outputParams_(NULL), - dllInteraction_(NULL), - invocationInfo_(NULL), - numPlanInfos_(0), - routineHandle_(NullCliRoutineHandle) - { }; - - TableMappingUDF(RelExpr * child0, + // expects at least arity (operator type depends on arity) + TableMappingUDF(int arity, ItemExpr *params = NULL, - OperatorTypeEnum otype = REL_TABLE_MAPPING_UDF, - CollHeap *oHeap = CmpCommon::statementHeap()) - : TableValuedFunction(child0, params, otype, oHeap), + CollHeap *oHeap = CmpCommon::statementHeap()) + : TableValuedFunction(NULL, params, getTMUDFOpType(arity), oHeap), childInfo_(oHeap), scalarInputParams_(NULL), outputParams_(NULL), dllInteraction_(NULL), invocationInfo_(NULL), numPlanInfos_(0), - routineHandle_(NullCliRoutineHandle) - { }; + routineHandle_(NullCliRoutineHandle), + isNormalized_(FALSE) + { setArity(arity); }; //! TableMappingUDF Constructor // expects at least a name - TableMappingUDF(const CorrName &name, ItemExpr *params = NULL, - OperatorTypeEnum otype = REL_TABLE_MAPPING_UDF, - CollHeap *oHeap = CmpCommon::statementHeap()) + TableMappingUDF(int arity, + const CorrName &name, + ItemExpr *params = NULL, + CollHeap *oHeap = CmpCommon::statementHeap()) + : TableValuedFunction(name, params, getTMUDFOpType(arity), oHeap), + childInfo_(oHeap), + scalarInputParams_(NULL), + outputParams_(NULL), + dllInteraction_(NULL), + invocationInfo_(NULL), + numPlanInfos_(0), + routineHandle_(NullCliRoutineHandle), + isNormalized_(FALSE) + { setArity(arity); }; + + //! TableMappingUDF Constructor + // constructor for derived classes with different operator type + TableMappingUDF(const CorrName &name, + ItemExpr *params, + int arity, + OperatorTypeEnum otype, + CollHeap *oHeap = CmpCommon::statementHeap()) : TableValuedFunction(name, params, otype, oHeap), childInfo_(oHeap), scalarInputParams_(NULL), @@ -726,8 +733,9 @@ public : dllInteraction_(NULL), invocationInfo_(NULL), numPlanInfos_(0), - routineHandle_(NullCliRoutineHandle) - { }; + routineHandle_(NullCliRoutineHandle), + isNormalized_(FALSE) + { setArity(arity); }; //! TableValueUDF Copy Constructor // a virtual function for displaying the name of the node @@ -744,6 +752,14 @@ public : virtual TableMappingUDF *castToTableMappingUDF(); + static OperatorTypeEnum getTMUDFOpType(int arity) + { + CMPASSERT(arity >= 0 && arity <= 2); + return (arity==0 ? REL_LEAF_TABLE_MAPPING_UDF + : (arity==1 ? REL_UNARY_TABLE_MAPPING_UDF + : REL_BINARY_TABLE_MAPPING_UDF)); + } + //! getText method // a virtual function for displaying the name of the node virtual const NAString getText() const ; @@ -977,6 +993,7 @@ protected: int numPlanInfos_; char *constParamBuffer_; Int32 constParamBufferLen_; + NABoolean isNormalized_; }; // class TableMappingUDF @@ -994,6 +1011,7 @@ class PredefinedTableMappingFunction : public TableMappingUDF // is a PhysicalTableMappingUDF, like for regular TMUDFs. public: PredefinedTableMappingFunction( + int arity, const CorrName &name, ItemExpr *params, OperatorTypeEnum otype, @@ -1003,7 +1021,7 @@ public: // static method to find out whether a given name is a // built-in table-mapping function - returns operator type - // of predefined function if so, REL_TABLE_MAPPING_UDF otherwise + // of predefined function if so, REL_xxx_TABLE_MAPPING_UDF otherwise static OperatorTypeEnum nameIsAPredefinedTMF(const CorrName &name); virtual const NAString getText() const; @@ -1038,14 +1056,9 @@ public: // constructor //! PhysicalTableMappingUDF Constructor - PhysicalTableMappingUDF(CollHeap *oHeap = CmpCommon::statementHeap()) - : TableMappingUDF(NULL, REL_TABLE_MAPPING_UDF, oHeap), - planInfo_(NULL) - {} - - PhysicalTableMappingUDF(RelExpr* child0, + PhysicalTableMappingUDF(int arity, CollHeap *oHeap = CmpCommon::statementHeap()) - : TableMappingUDF(child0, NULL, REL_TABLE_MAPPING_UDF, oHeap), + : TableMappingUDF(arity, NULL, oHeap), planInfo_(NULL) {} http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/91a809b1/core/sql/parser/sqlparser.y ---------------------------------------------------------------------- diff --git a/core/sql/parser/sqlparser.y b/core/sql/parser/sqlparser.y index 9cd6063..73b802d 100755 --- a/core/sql/parser/sqlparser.y +++ b/core/sql/parser/sqlparser.y @@ -8443,10 +8443,9 @@ table_mapping_function_invocation : YYABORT; TableMappingUDF *tmudf = - new (PARSERHEAP()) TableMappingUDF(*functionName, $4 ); + new (PARSERHEAP()) TableMappingUDF(1, *functionName, $4 ); tmudf->child(0) = $3; - tmudf->setArity(1); $$ = tmudf; } | qualified_name '(' optional_tmudf_param_list ')' @@ -8456,7 +8455,7 @@ table_mapping_function_invocation : if (functionName == NULL) YYABORT; - $$ = new (PARSERHEAP()) TableMappingUDF(*functionName, $3 ); + $$ = new (PARSERHEAP()) TableMappingUDF(0, *functionName, $3 ); }
