villebro commented on a change in pull request #9370: Add visualization flow to
the CTA queries
URL:
https://github.com/apache/incubator-superset/pull/9370#discussion_r399204682
##########
File path: superset-frontend/src/SqlLab/components/ResultSet.jsx
##########
@@ -216,18 +217,45 @@ export default class ResultSet extends
React.PureComponent {
</Alert>
);
} else if (query.state === 'success' && query.ctas) {
+ // Get the schema of the temporary table that was created.
+ let schema = query.schema;
+ let tempTable = query.tempTable;
+ // Sync queries only have tempTable in query.results.query
+ if (
+ query.results &&
+ query.results.query &&
+ query.results.query.tempTable
+ ) {
+ tempTable = query.results.query.tempTable;
+ }
+ if (tempTable !== undefined) {
+ const tableNameParts = tempTable.split('.');
+ if (tableNameParts.length > 1) {
+ schema = tableNameParts[0];
+ }
Review comment:
In reference to earlier discussions, I think it might make sense to emit an
error if a user tries to create a temp table that contains a period until we
fix this for good.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]