XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.1.0
    • None
    • SQL
    • None

    Description

      Currently, caching a temporary or permenant view doesn't work in certain cases. For instance, in the following:

      CREATE TABLE t (key bigint, value string) USING parquet
      CREATE VIEW v1 AS SELECT key FROM t
      CACHE TABLE v1
      SELECT key FROM t
      

      The last SELECT query will hit the cached v1. On the other hand:

      CREATE TABLE t (key bigint, value string) USING parquet
      CREATE VIEW v1 AS SELECT key FROM t ORDER by key
      CACHE TABLE v1
      SELECT key FROM t ORDER BY key
      

      The SELECT won't hit the cache.

      It seems this is related to EliminateView. In the second case, it will insert an extra project operator which makes the comparison on canonicalized plan during cache lookup fail.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              csun Chao Sun
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: