Skip to content

Commit ffbb477

Browse files
author
Kusto Build System
committed
Auto-sync from Azure-Kusto-Service
1 parent 26f1060 commit ffbb477

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/Kusto.Language/Binder/Binder_Names.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,5 +862,12 @@ private static bool IsInTabularContext(SyntaxElement element)
862862

863863
return false;
864864
}
865+
866+
private static bool IsInWildcardColumnOnlyContext(SyntaxElement element)
867+
{
868+
// project-away and project-keep operator only allows columns to bind in wildcards
869+
return element.GetFirstAncestor<QueryOperator>() is QueryOperator op
870+
&& (op is ProjectAwayOperator || op is ProjectKeepOperator);
871+
}
865872
}
866873
}

src/Kusto.Language/Binder/Binder_NodeBinder.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,8 +621,10 @@ private SemanticInfo VisitWildcardedNameReference(NameReference node, string pat
621621

622622
try
623623
{
624-
var match = IsInTabularContext(node)
625-
? SymbolMatch.Table | SymbolMatch.Function | SymbolMatch.View | SymbolMatch.Local | SymbolMatch.Tabular
624+
var match = IsInTabularContext(node)
625+
? SymbolMatch.Table | SymbolMatch.Function | SymbolMatch.View | SymbolMatch.Local | SymbolMatch.Tabular
626+
: IsInWildcardColumnOnlyContext(node)
627+
? SymbolMatch.Column
626628
: SymbolMatch.Column | SymbolMatch.Function | SymbolMatch.View | SymbolMatch.Local | SymbolMatch.Scalar;
627629

628630
_binder.GetSymbolsInContext(node, match, IncludeFunctionKind.LocalViews | IncludeFunctionKind.DatabaseFunctions, list);

0 commit comments

Comments
 (0)