Bug 1492642

Summary: Regression of TEIID-4543 - Rewrite parse/format of standard formats to cast instead
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Andrej Smigala <asmigala>
Component: Teiid, DocumentationAssignee: David Le Sage <dlesage>
Status: CLOSED WONTFIX QA Contact: Andrej Smigala <asmigala>
Severity: high Docs Contact:
Priority: high    
Version: 6.4.0CC: asmigala, blafond, dlesage, drieden, gjospin, jolee, jschatte, thauser, vhalbert
Target Milestone: GAKeywords: Documentation
Target Release: 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Calls to PARSEDATE or PARSETIME which have a timestamp value as the first argument are now pushed as CONVERTs (otherwise they are pushed as regular PARSEDATEs or PARSETIMEs respectively).
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-01 08:28:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrej Smigala 2017-09-18 11:41:59 UTC
Description of problem:

A regression was found for an enhancement originally introduced in 6.3.4. 

According to TEIID-4543, parsing a date or time from a string column using the PARSEDATE or PARSETIME functions should be pushed as simple cast in case the format string is the standard value ('yyyy-MM-dd' and 'hh:mm:ss' respectively).

However, running e.g.

    SELECT IntKey FROM Source.SmallA WHERE PARSEDATE(StringKey, 'yyyy-MM-dd') = {d'2016-12-19'}

with 6.4 ER2 shows the following in the query plan:

   AccessNode(0) output=[Source.smalla.intkey] SELECT g_0.intkey AS c_0 FROM Source.smalla AS g_0 WHERE convert(parsetimestamp(g_0.stringkey, 'yyyy-MM-dd'), date) = {d'2016-12-19'} LIMIT 100
  

i.e. there is still the call to parsetimestamp function.

Comment 6 David Le Sage 2017-12-05 22:37:20 UTC
Added as known issue errata to release notes.