Skip to content

Commit

Permalink
remove check for no index pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Apr 10, 2024
1 parent 8a546bb commit 9c59118
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ export async function getDataViewByTextBasedQueryLang(
}
if ('esql' in query) {
indexPatternFromQuery = getIndexPatternFromESQLQuery(query.esql);

/*
if (indexPatternFromQuery === '') {
return new DataView({ fieldFormats: services.fieldFormats });
return new DataView({ id: 'esql-', fieldFormats: services.fieldFormats });
return getESQLAdHocDataview(indexPatternFromQuery, services.dataViews);
}
*/
}
// we should find a better way to work with ESQL queries which dont need a dataview
if (!indexPatternFromQuery && currentDataView) return currentDataView;
// if (!indexPatternFromQuery && currentDataView) return currentDataView;

if (
currentDataView?.isPersisted() ||
Expand Down

0 comments on commit 9c59118

Please sign in to comment.