Github user DaveBirdsall commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1622#discussion_r199650319 --- Diff: core/sql/optimizer/SynthType.cpp --- @@ -4416,6 +4416,22 @@ const NAType *Extract::synthesizeType() return NULL; } + if ( type != NA_DATETIME_TYPE ) + { + enum rec_datetime_field eField = getExtractField(); + NAString sErr; + if ( REC_DATE_WEEK == eField + || REC_DATE_DOW == eField + || REC_DATE_DOY == eField + || REC_DATE_WOM == eField + || REC_DATE_CENTURY == eField) --- End diff -- Should DECADE be in this list too?
---