@@ -59,22 +59,22 @@ public class FieldNameUtils {
5959 public static PreAnalysisResult resolveFieldNames (LogicalPlan parsed , EnrichResolution enrichResolution ) {
6060
6161 // we need the match_fields names from enrich policies and THEN, with an updated list of fields, we call field_caps API
62- var enrichPolicyMatchFields = enrichResolution .resolvedEnrichPolicies ()
62+ Set < String > enrichPolicyMatchFields = enrichResolution .resolvedEnrichPolicies ()
6363 .stream ()
6464 .map (ResolvedEnrichPolicy ::matchField )
6565 .collect (Collectors .toSet ());
6666
6767 // get the field names from the parsed plan combined with the ENRICH match fields from the ENRICH policy
6868 List <LogicalPlan > inlinestats = parsed .collect (InlineStats .class ::isInstance );
6969 Set <Aggregate > inlinestatsAggs = new HashSet <>();
70- for (var i : inlinestats ) {
70+ for (LogicalPlan i : inlinestats ) {
7171 inlinestatsAggs .add (((InlineStats ) i ).aggregate ());
7272 }
7373
7474 if (false == parsed .anyMatch (p -> shouldCollectReferencedFields (p , inlinestatsAggs ))) {
7575 // no explicit columns selection, for example "from employees"
7676 // also, inlinestats only adds columns to the existent output, its Aggregate shouldn't interfere with potentially using "*"
77- return new PreAnalysisResult (enrichResolution , IndexResolver .ALL_FIELDS , Set .of ());
77+ return new PreAnalysisResult (enrichResolution , IndexResolver .ALL_FIELDS , Set .of (), false );
7878 }
7979
8080 Holder <Boolean > projectAll = new Holder <>(false );
@@ -86,7 +86,7 @@ public static PreAnalysisResult resolveFieldNames(LogicalPlan parsed, EnrichReso
8686 });
8787
8888 if (projectAll .get ()) {
89- return new PreAnalysisResult (enrichResolution , IndexResolver .ALL_FIELDS , Set .of ());
89+ return new PreAnalysisResult (enrichResolution , IndexResolver .ALL_FIELDS , Set .of (), false );
9090 }
9191
9292 var referencesBuilder = new Holder <>(AttributeSet .builder ());
@@ -221,7 +221,7 @@ public static PreAnalysisResult resolveFieldNames(LogicalPlan parsed, EnrichReso
221221 parsed .forEachDownMayReturnEarly (forEachDownProcessor .get ());
222222
223223 if (projectAll .get ()) {
224- return new PreAnalysisResult (enrichResolution , IndexResolver .ALL_FIELDS , Set .of ());
224+ return new PreAnalysisResult (enrichResolution , IndexResolver .ALL_FIELDS , Set .of (), false );
225225 }
226226
227227 // Add JOIN ON column references afterward to avoid Alias removal
@@ -235,12 +235,12 @@ public static PreAnalysisResult resolveFieldNames(LogicalPlan parsed, EnrichReso
235235
236236 if (fieldNames .isEmpty () && enrichPolicyMatchFields .isEmpty ()) {
237237 // there cannot be an empty list of fields, we'll ask the simplest and lightest one instead: _index
238- return new PreAnalysisResult (enrichResolution , IndexResolver .INDEX_METADATA_FIELD , wildcardJoinIndices );
238+ return new PreAnalysisResult (enrichResolution , IndexResolver .INDEX_METADATA_FIELD , wildcardJoinIndices , false );
239239 } else {
240240 fieldNames .addAll (subfields (fieldNames ));
241241 fieldNames .addAll (enrichPolicyMatchFields );
242242 fieldNames .addAll (subfields (enrichPolicyMatchFields ));
243- return new PreAnalysisResult (enrichResolution , fieldNames , wildcardJoinIndices );
243+ return new PreAnalysisResult (enrichResolution , fieldNames , wildcardJoinIndices , false );
244244 }
245245 }
246246
0 commit comments