villebro commented on a change in pull request #17006:
URL: https://github.com/apache/superset/pull/17006#discussion_r728882086
##########
File path:
superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.jsx
##########
@@ -175,62 +184,80 @@ export default class AdhocFilterEditPopover extends
React.Component {
const stateIsValid = adhocFilter.isValid();
const hasUnsavedChanges = !adhocFilter.equals(propsAdhocFilter);
+ const sectionRenders = {};
+
+ sectionRenders.CUSTOM_SQL = (
+ <ErrorBoundary>
+ {!this.props.datasource || this.props.datasource.type !== 'druid' ? (
+ <AdhocFilterEditPopoverSqlTabContent
+ adhocFilter={this.state.adhocFilter}
+ onChange={this.onAdhocFilterChange}
+ options={this.props.options}
+ height={this.state.height}
+ activeKey={this.state.activeKey}
+ />
+ ) : (
+ <div className="custom-sql-disabled-message">
+ Custom SQL Filters are not available on druid datasources
+ </div>
Review comment:
Bycatch and we're killing native Druid soon anyway, but maybe we could
just remove the `CUSTOM_SQL` tab when `this.props.datasource.type === 'druid'`
to leverage this new feature
##########
File path:
superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopover/index.jsx
##########
@@ -175,62 +184,80 @@ export default class AdhocFilterEditPopover extends
React.Component {
const stateIsValid = adhocFilter.isValid();
const hasUnsavedChanges = !adhocFilter.equals(propsAdhocFilter);
+ const sectionRenders = {};
Review comment:
Uhh I really wish this was TS so we could type this object..
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]