Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Symptom
The TDVT test case calcs_data.time/time1 fails to match expected results as documented in Jira ticket II-12232. A similar failure (with same root cause) occurs when performing an Extract Data operation as required by Tableau Manual QA Tests.
Cause
The DDL of the Calcs table in the Tableau TDVT dataset defines the time1 column as type
TIME
and yet Tableau itself does not have aTIME
data type (references A, B, C, D), thus workarounds are required to extract and/or display only the time portion of DATETIME/TIMESTAMP data in Tableau.Tableau Built-in Function
The Tableau Connector SDK sample dialect SQLDialect contains a function called TIME1899 that overrides a Tableau built-in function of the same name, which translates time values so that they contain a pre-pended date of
1899-12-30
. In other words, the purpose of the TIME1899 function is to translate data source TIME data into DATETIME data that Tableau can handle which later can be dealt with in Tableau for extracting parts of the datetime value as needed.Proposed Solution
Override the built-in TIME1899 function so that "time" data returned by the JDBC and ODBC drivers is preserved by the Actian connector(s). The Tableau built-in TIME1899 function still fixes up the "time" data (somewhere before the data is shown in Tableau Desktop) with the fixed date of
1899-12-30
, but the dialect fix allows TDVT and manual QA tests to succeed.Test Results
The proposed solution works both with the TDVT suite and the "Extract Data" operation of the Manual QA tests. The fix allows the TDVT test calcs_data.time/time1 to succeed in matching expected results and no adverse affects are seen with any other TDVT test cases.