Alireza Samadianzakaria created BEAM-7655:
---------------------------------------------
Summary: Multiple Instances of Beam Table During Query Planning
Key: BEAM-7655
URL: https://issues.apache.org/jira/browse/BEAM-7655
Project: Beam
Issue Type: Improvement
Components: dsl-sql
Reporter: Alireza Samadianzakaria
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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)