Skip to content
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

chore: type ResultSet.tsx #10226

Merged
merged 1 commit into from Jul 2, 2020
Merged

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Jul 2, 2020

SUMMARY

As titled. Also includes a couple small refactors/bug fixes that i came across as I was working

TEST PLAN

CI

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

to: @ktmud @graceguo-supercat @nytai @bkyryliuk

@@ -387,7 +387,7 @@ export const stoppedQuery = {
startDttm: 1497400851936,
state: 'stopped',
tab: 'Untitled Query 2',
tempTableName: '',
tempTable: '',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I aligned on this name everywhere because that's how the backend sends it

Comment on lines -221 to -228
// Async queries
let tmpSchema = query.tempSchema;
let tmpTable = query.tempTableName;
// Sync queries, query.results.query contains the source of truth for them.
if (query.results && query.results.query) {
tmpTable = query.results.query.tempTable;
tmpSchema = query.results.query.tempSchema;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this logic is moved to the reducer, it seems cleaner (although it's a big janky to have the query in 2 different places here)

@@ -235,20 +236,21 @@ export default class ResultSet extends React.PureComponent {
<Alert bsStyle="info">
{t(object)} [
<strong>
{tmpSchema}.{tmpTable}
{tempSchema ? `${tempSchema}.` : ''}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When testing on sqllite, there wasn't always a schema, so i cleaned up the cases where schema can be null

@etr2460 etr2460 force-pushed the erik-ritter--type-resultset branch from 37f0968 to 01db9f8 Compare July 2, 2020 02:50
Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@etr2460
Copy link
Member Author

etr2460 commented Jul 2, 2020

Thanks for the quick stamps! I'm going to wait for @bkyryliuk to take a look as well since the CTAS logic was the main functional change here and i want to make sure it looks good to him

Copy link
Member

@bkyryliuk bkyryliuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the cleanup, looks good.
Also tested CTAS / CVAS and they are working locally

@etr2460 etr2460 merged commit 4281ad5 into apache:master Jul 2, 2020
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants