[ 
https://issues.apache.org/jira/browse/HIVE-25656?focusedWorklogId=682537&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-682537
 ]

ASF GitHub Bot logged work on HIVE-25656:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Nov/21 11:26
            Start Date: 17/Nov/21 11:26
    Worklog Time Spent: 10m 
      Work Description: kasakrisz commented on a change in pull request #2756:
URL: https://github.com/apache/hive/pull/2756#discussion_r751148742



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##########
@@ -12847,13 +12849,21 @@ protected void saveViewDefinition() throws 
SemanticException {
     createVwDesc.setViewExpandedText(expandedText);
   }
 
-  private Set<String> getTablesUsed(ParseContext parseCtx) {
-    Set<String> tablesUsed = new HashSet<>();
+  private Set<SourceTable> getTablesUsed(ParseContext parseCtx) {
+    Set<SourceTable> tablesUsed = new HashSet<>();
     for (TableScanOperator topOp : parseCtx.getTopOps().values()) {
       Table table = topOp.getConf().getTableMetadata();
       if (!table.isMaterializedTable() && !table.isView()) {
         // Add to signature
-        tablesUsed.add(table.getFullyQualifiedName());
+        SourceTable sourceTable = new SourceTable();

Review comment:
       Refactored how `SourceTable` instances are created and in some cases 
like the one you mentioned `TableName` is a better choice because the stats 
contained by `SourceTable` is not needed here.
   Added factory methods to `ql.metadata.Table`
   * `SourceTable createSourceTable()` - to create a `SourceTable` instance in 
an initial state referencing this table instance.
   * `TableName getFullTableName()` - to create a `TableName` using this table 
instance.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 682537)
    Time Spent: 2h  (was: 1h 50m)

> Get materialized view state based on number of affected rows of transactions
> ----------------------------------------------------------------------------
>
>                 Key: HIVE-25656
>                 URL: https://issues.apache.org/jira/browse/HIVE-25656
>             Project: Hive
>          Issue Type: Improvement
>          Components: Materialized views, Transactions
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> To enable the faster incremental rebuild of materialized views presence of 
> update/delete operations on the source tables of the view since the last 
> rebuild must be checked. Based on the outcome different plan is generated for 
> scenarios in presence of update/delete and insert only operations.
> Currently this is done by querying the COMPLETED_TXN_COMPONENTS table however 
> the records from this table is cleaned when MV source tables are compacted. 
> This reduces the chances of incremental MV rebuild.
> The goal of this patch is to find an alternative way to store and retrieve 
> this information.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to