chore: removing Druid from front- and back- end (#20338)

* first pass at removing native Druid nosql

* removing having_druid

* addressing comments, linting

* fixed all tests

* addressing comments

* redirected to ui-core TimeGranularity type

* query form metric linting

* fixed broken chart type

* implementing feedback
This commit is contained in:
AAfghahi
2022-07-08 11:57:03 -04:00
committed by GitHub
parent 9856d88c03
commit 0ce0c6e1eb
47 changed files with 65 additions and 454 deletions

View File

@@ -57,7 +57,7 @@ const getMemoizedSectionsToRender = memoizeOne(
// list of datasource-specific controls that should be removed
const invalidControls =
datasourceType === 'table'
? ['granularity', 'druid_time_origin']
? ['granularity']
: ['granularity_sqla', 'time_grain_sqla'];
return [datasourceAndVizType]

View File

@@ -22,6 +22,7 @@ import {
AdhocMetricSQL,
getChartControlPanelRegistry,
QueryFormData,
TimeGranularity,
} from '@superset-ui/core';
import TableChartPlugin from '@superset-ui/plugin-chart-table';
import { BigNumberTotalChartPlugin } from '@superset-ui/plugin-chart-echarts';
@@ -83,7 +84,7 @@ describe('should collect control values and create SFD', () => {
const publicControlsFormData = {
// time section
granularity_sqla: 'time_column',
time_grain_sqla: 'P1D',
time_grain_sqla: TimeGranularity.DAY,
time_range: '2000 : today',
// filters
adhoc_filters: [],
@@ -115,6 +116,7 @@ describe('should collect control values and create SFD', () => {
datasource: '100__table',
viz_type: 'source_viz',
};
const sourceMockStore = {
form_data: sourceMockFormData,
controls: Object.fromEntries(
@@ -128,6 +130,7 @@ describe('should collect control values and create SFD', () => {
columns: [],
},
};
beforeAll(() => {
getChartControlPanelRegistry().registerValue('source_viz', {
controlPanelSections: [
@@ -272,7 +275,7 @@ describe('should transform form_data between table and bigNumberTotal', () => {
datasource: '30__table',
viz_type: 'table',
granularity_sqla: 'ds',
time_grain_sqla: 'P1D',
time_grain_sqla: TimeGranularity.DAY,
time_range: 'No filter',
query_mode: 'aggregate',
groupby: ['name', 'gender', adhocColumn],

View File

@@ -145,7 +145,6 @@ export class StandardizedFormData {
if (this.has(vizType)) {
return this.get(vizType);
}
return this.memorizedFormData.slice(-1)[0][1];
}
@@ -205,6 +204,7 @@ export class StandardizedFormData {
...getFormDataFromControls(targetControlsState),
standardizedFormData: this.serialize(),
};
let rv = {
formData: targetFormData,
controlsState: targetControlsState,