File tree Expand file tree Collapse file tree
website/src/languages/helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,19 +304,6 @@ const getColumnCompletions = async (
304304 const words = wordRanges . map ( ( wr ) => wr . text ) ;
305305 const result : ICompletionItem [ ] = [ ] ;
306306
307- // Extract already selected columns from QUERY_RESULT to filter them out
308- const queryResultEntity = entities . find (
309- ( entity ) => entity . entityContextType === EntityContextType . QUERY_RESULT
310- ) as CommonEntityContext | undefined ;
311-
312- const selectedColumns = new Set < string | languages . CompletionItemLabel > ( ) ;
313- queryResultEntity ?. columns ?. forEach ( ( col ) => {
314- const columnName = col [ AttrName . alias ] ?. text || getPureEntityText ( col . text ) ;
315- if ( columnName ) {
316- selectedColumns . add ( columnName ) ;
317- }
318- } ) ;
319-
320307 // All tables defined in the context
321308 const allTableDefinitionEntities =
322309 ( entities ?. filter (
@@ -511,18 +498,6 @@ const getColumnCompletions = async (
511498 }
512499 }
513500
514- // Filter out already selected columns in QUERY_RESULT
515- if ( selectedColumns . size > 0 ) {
516- return result . filter ( ( item ) => {
517- const columnName =
518- ( item as EnhancedCompletionItem ) . _columnText ||
519- ( typeof item . label === 'string'
520- ? item . label
521- : ( item . label as EnhancedCompletionItem ) . label ) ;
522- return ! selectedColumns . has ( columnName ) ;
523- } ) ;
524- }
525-
526501 return result ;
527502} ;
528503
You can’t perform that action at this time.
0 commit comments