Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-7655

Multiple Instances of Beam Table During Query Planning

Details

    • Improvement
    • Status: Open
    • P3
    • Resolution: Unresolved
    • None
    • None
    • dsl-sql
    • None

    Description

      When Calcite is planning the query it may ask the table provider for the same table multiple times and in different alternative query plans there might be different instances of the same table.

      Since the row count estimation is stored in the table instances, each time that the row count estimation is called for a new instance, the table creates a new estimate. The estimation may take some time; therefore, this can potentially downgrade the performance (of planning) and increase the planning time.

      There are two potential ways to solve this problem:

      1- Make sure that the table providers do not create multiple instances for the same table. 

      or

      2- Keep the row count estimations in a common data structure or a static Map and reuse it in multiple instances when needed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            riazela Alireza Samadianzakaria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: