[ https://issues.apache.org/jira/browse/SPARK-33311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chao Sun updated SPARK-33311: ----------------------------- Description: Currently, the semantics for {{REFRESH TABLE t}} is not well defined for view (let's say {{view}}) that reference the table {{t}}: 1. If {{view}} is cached, the behavior is not well-defined. Should Spark invalidate the cache (current behavior) or recache it? 2. If {{view}} is a temporary view, currently refreshing {{t}} does not refresh {{view}} since it will just reuse the logical plan defined in the session catalog. This could lead query failures (although with a helpful error message) or to incorrect results depending on the refresh behavior. I think we should clear define and document the behavior here, so that users won't get confused. was: Currently, the semantics for {{REFRESH TABLE t}} is not well defined for view (let's say {{view}}) that reference the table {{t}}: 1. If {{view}} is cached, the behavior is not well-defined. Should Spark invalidate the cache (current behavior) or recache it? 2. If {{view}} is a temporary view, currently refreshing {{t}} does not refresh {{view}} since it will just reuse the logical plan stored in the session catalog. This could lead to incorrect results. I think we should clear define and document the behavior here, so that users won't get confused. > Improve semantics for REFRESH TABLE > ----------------------------------- > > Key: SPARK-33311 > URL: https://issues.apache.org/jira/browse/SPARK-33311 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.0.1 > Reporter: Chao Sun > Priority: Major > > Currently, the semantics for {{REFRESH TABLE t}} is not well defined for view > (let's say {{view}}) that reference the table {{t}}: > 1. If {{view}} is cached, the behavior is not well-defined. Should Spark > invalidate the cache (current behavior) or recache it? > 2. If {{view}} is a temporary view, currently refreshing {{t}} does not > refresh {{view}} since it will just reuse the logical plan defined in the > session catalog. This could lead query failures (although with a helpful > error message) or to incorrect results depending on the refresh behavior. > I think we should clear define and document the behavior here, so that users > won't get confused. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org