[ 
https://issues.apache.org/jira/browse/HIVE-23479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108721#comment-17108721
 ] 

Stamatis Zampetakis commented on HIVE-23479:
--------------------------------------------

Credits for this discovery go to [~kgyrtkirk]! :)

> Avoid regenerating JdbcSchema for every table in a query
> --------------------------------------------------------
>
>                 Key: HIVE-23479
>                 URL: https://issues.apache.org/jira/browse/HIVE-23479
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Planning
>            Reporter: Stamatis Zampetakis
>            Priority: Major
>
> Currently {{CalcitePlanner}} generates a complete {{JdbcSchema}} for every 
> {{JdbcTable}} in the query.
> https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java#L3174
> This wastes some resources since every call to {{JdbcSchema#getTable}} needs 
> to communicate with the database to bring back the tables belonging to the 
> schema. Moreover, the fact that a schema is created during planning is 
> counter-intuitive since in principle the schema shouldn't change.  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to