Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-23479

Avoid regenerating JdbcSchema for every table in a query

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Query Planning
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zabetak Stamatis Zampetakis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: