Skip to content

Resolve nested higher-order function arguments before deriving lambda parameters #25646

Closed

Description

@gabotechs

Context

Follow-up from #25418 (comment).

resolve_higher_order_function currently resolves non-lambda arguments only when !vars.is_empty() and then returns TreeNodeRecursion::Jump. A higher-order function used as an ordinary value argument at the outermost scope is therefore not resolved before the enclosing function derives its lambda parameters.

Reproducer

array_any_match(array_transform(tags, x -> x), y -> y = 'c')\n```\n\nThis can leave the outer resolver with an unresolved nested return type and result in `LambdaVariable field and schema field mismatch`.\n\n### Follow-up\n\nResolve non-lambda arguments unconditionally before deriving the enclosing function lambda parameters, and add a regression test for the nested higher-order-function case above.

Activity

  1. ShayanGho commented on Sep 27, 2026

    @ShayanGho
    Contributor

    Hello @gabotechs, I think this landed in #25418 after all. LiaCastaneda addressed it in c9e0d62 (the resolver now resolves non-lambda args unconditionally) and added nested_higher_order_function_with_dictionary_encoded_lambda_parameter covering the reported nested-function case. Looks like this can be closed.

  2. gabotechs commented on Sep 28, 2026

    @gabotechs
    ContributorAuthor

    Closed by #25418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions