Github user DaveBirdsall commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1658#discussion_r206907388 --- Diff: core/sql/generator/GenPreCode.cpp --- @@ -7518,6 +7518,53 @@ ItemExpr * AggrMinMax::preCodeGen(Generator * generator) return this; } // AggrMinMax::preCodeGen() +ItemExpr *Overlaps::preCodeGen(Generator *generator) +{ + if (nodeIsPreCodeGenned()) + return getReplacementExpr(); + + for (Int32 i = 0; i < getArity(); ++i) + { + if (child(i)) + { + const NAType &type = + child(i)->getValueId().getType(); + const DatetimeType *operand = (DatetimeType *)&type; + + if (type.getTypeQualifier() == NA_DATETIME_TYPE + && (operand->getPrecision() == SQLDTCODE_DATE)) + { + child(i) = new (generator->wHeap()) + Cast(child(i), new (generator->wHeap()) + SQLTimestamp(generator->wHeap(), TRUE)); + + child(i)->bindNode(generator->getBindWA()); + } + + } + } + + ItemExpr *newExpr = + generator->getExpGenerator()->createExprTree( --- End diff -- I agree with @zellerh on the interpretation of the standard.
---