-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for TDVT test cases in tickets II-12247, II-12248, II-12251, II-12252, II-12253, II-12254 #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -25,7 +25,7 @@ | |||
|
|||
<customization name="CAP_SELECT_INTO" value="yes"/> | |||
<customization name="CAP_SELECT_TOP_INTO" value="yes"/> | |||
<customization name="CAP_CREATE_TEMP_TABLES" value="yes"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a comment/explanation. I think what you described to me on the phone is fine :-)
From verbal discussion, it looks like Tableau treats this as a "I need to use temporary tables" flag, either for performance reasons or due to possible missing functionality in the backend. Because Vector is so fast, we can handle inline queries, setting to false/no enables this sql push down support. NOTE possible performance implications for Actian X/Ingres with new "no" setting.
You also mentioned that this fixes an unsupported SQL error, due to (what to me looks non-standard, but is probably modern SQL that I'm not familiar with). SELECT INTO table (instead of INSERT AS SELECT...). I think this needs follow up (apologies for the yak shaving suggestion!):
- open internal ticket with Vector/Ingres team to confirm SQL syntax (and whether this is something we need to suport) KarlS is top of the list but other engineers need to weigh in.
- open ticket/dialog with Bermet and their team on this, is there a way to switch to good-old INSERT AS SELECT? (and link to this). This may be a problem in the future (or with something not covered by the test suite).
CC @iancr01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By "comment", I meant an XML comment in scope.
This also needs to go into ODBC file too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @clach04 for all the comments. Adding some details here and will address other suggestions separately.
The Tableau Capabilities page explains the setting that was changed to resolved the errors.
Capability | Description |
---|---|
CAP_CREATE_TEMP_TABLES | Set to ‘yes’ if Tableau can create temporary tables needed for certain complex or optimized queries. Set to ‘no’ if creating temporary tables is not supported. |
With this capability set to yes
, Tableau was generating SQL SELECT
statements with a clause for inserting the retrieved rows into temporary tables, which, from my research, looks to be unsupported by Ingress 11.2 and Vector 6.3. Changing the setting to no
removed the temporary table clause and allowed the SQL queries to execute successfully.
Example
Test Name: Query.Sort_Alphabetic_DESC_Top1
Ticket: II-12247
TDVT Error Msg from test_results_combined.csv
Unable to materialize temporary table: A SELECT statement with an INTO clause after the target list may only be used by host language SQL, or in a stored (database) procedure.
Failing - Generated SQL from jprotocolserver.log
SELECT TOP 1 "Staples"."Customer Name" AS "Customer_Name" INTO "zTableau_1_B617B611_E37F_445C_97E3_6B3419F1620D_4_TempTable" FROM "actian"."Staples" "Staples" GROUP BY 1 ORDER BY 1 DESC NULLS LAST
Successful - Fixed Query from test_results_combined.csv
SELECT TOP 1 "Staples"."Customer Name" AS "Customer_Name" FROM "actian"."Staples" "Staples" GROUP BY 1 ORDER BY 1 DESC NULLS LAST
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created internal Jira ticket II-12473 to confirm whether or not Actian databases support the SELECT (col list) INTO (temp table) ...
syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set CAP_CREATE_TEMP_TABLES="no"
in actian_odbc/manifest.xml to match actian_jdbc/manifest.xml.
Added comments in manifest.xml files explaining reason for setting this value to "no".
The connector capability setting
Issue 1185 has been logged with the Tableau Connector SDK team to better understand the connector capability settings CAP_CREATE_TEMP_TABLES and CAP_SELECT_INTO. Will proceed with merge of this change. |
Summary
Remedy failures that occur in TDVT test cases using the Actian JDBC Connector.
TDVT Test Cases Fixed
Test Results
test_results_combined-BeforeFix.csv
test_results_combined-AfterFix.csv