Skip to content

Commit

Permalink
Revert "chore: Refactor ExploreMixin to power both Datasets (SqlaTabl…
Browse files Browse the repository at this point in the history
…e) and Query models (apache#22853)"

This reverts commit d581d69.
  • Loading branch information
jinghua-qa committed Apr 14, 2023
1 parent 61ddfe6 commit dde58a3
Show file tree
Hide file tree
Showing 10 changed files with 967 additions and 413 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export type ExploreQuery = QueryResponse & {
};

export interface ISimpleColumn {
column_name?: string | null;
name?: string | null;
type?: string | null;
is_dttm?: boolean | null;
}
Expand Down Expand Up @@ -216,7 +216,7 @@ export const SaveDatasetModal = ({
...formDataWithDefaults,
datasource: `${datasetToOverwrite.datasetid}__table`,
...(defaultVizType === 'table' && {
all_columns: datasource?.columns?.map(column => column.column_name),
all_columns: datasource?.columns?.map(column => column.name),
}),
}),
]);
Expand Down Expand Up @@ -301,7 +301,7 @@ export const SaveDatasetModal = ({
...formDataWithDefaults,
datasource: `${data.table_id}__table`,
...(defaultVizType === 'table' && {
all_columns: selectedColumns.map(column => column.column_name),
all_columns: selectedColumns.map(column => column.name),
}),
}),
)
Expand Down
6 changes: 3 additions & 3 deletions superset-frontend/src/SqlLab/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -692,17 +692,17 @@ export const testQuery: ISaveableDatasource = {
sql: 'SELECT *',
columns: [
{
column_name: 'Column 1',
name: 'Column 1',
type: DatasourceType.Query,
is_dttm: false,
},
{
column_name: 'Column 3',
name: 'Column 3',
type: DatasourceType.Query,
is_dttm: false,
},
{
column_name: 'Column 2',
name: 'Column 2',
type: DatasourceType.Query,
is_dttm: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class AdhocMetricOption extends React.PureComponent {
}

onRemoveMetric(e) {
e?.stopPropagation();
e.stopPropagation();
this.props.onRemoveMetric(this.props.index);
}

Expand Down
Loading

0 comments on commit dde58a3

Please sign in to comment.