Skip to content

[bug] bind visitor causes RecursionError: maximum recursion depth exceeded #1785

@kevinjqliu

Description

@kevinjqliu

Apache Iceberg version

main (development)

Please describe the bug 🐞

As seen in #1571 and #1759

The bind function uses the visitors pattern. The recursion depth is determined by both the schema and the expression passed to the function. When either the schema or expression is deeply nested, the visitor runs into the RecursionError

A temporary workaround can be to override the system recursion limit

import sys
sys.setrecursionlimit(5000)

from #1759 (comment)

Willingness to contribute

  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time

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