ActianCorp / actian_tableau_connector

Tableau connector (aka taco) for Actian Avalanche, Vector, and Ingres
https://extensiongallery.tableau.com/products/936
Apache License 2.0
1 stars 4 forks source link

Fix CHAR padding mismatch in TDVT runs #30

Closed hab6 closed 1 year ago

hab6 commented 1 year ago

Summary of problem

TDVT test cases are failing when using the Actian JDBC connector due to mismatching actual versus expected results caused by result values being padded with trailing spaces.

The failing tests:

DATENAME('week', [date2], 'sunday')
DATENAME('week', [datetime0], 'sunday')
DATENAME('week', [date2])
DATENAME('week', [datetime0])

Note: This problem seems to only affect the Actian JDBC connector. The ODBC connector is unaffected since the results when using the ODBC connector returned are not padded even though the dialect translation is the same.

Example results excerpt showing differences before and after fix

Without Fix With Fix
""12    ""
""17 ""
""18 ""
""2 ""
""12""
""17""
""18""
""2""

Solution

The fix changes the dialect translation for these particular tests cases from using CAST ... CHAR to CAST ... VARCHAR for the JDBC connector. The ODBC connector dialect is also updated to match the JDBC connector although the change has no impact on the ODBC connector.

TDVT test results

Connector Passed Failed Total
JDBC without fix 819 49 868
JDBC with fix 823 45 868
ODBC (with/without fix) 823 45 868
clach04 commented 1 year ago

Sorry for delay, laptop problems 😿