[ https://issues.apache.org/jira/browse/HIVE-18825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16382598#comment-16382598 ]
Jesus Camacho Rodriguez edited comment on HIVE-18825 at 3/1/18 8:24 PM: ------------------------------------------------------------------------ [~ekoifman], thanks. It is not about opening the txn after I get the list, the call to get the valid txn list happens after we may open a transaction in Driver#compile (L595) (I have not changed that). We hit the assertion when we have not open a transaction yet at all (for instance, first line to execute in the test is 'use databasex;'). For safety, I can keep the assertion, and only create the valid txn list if we have already opened a transaction in the system. Does it sound reasonable? was (Author: jcamachorodriguez): [~ekoifman], thanks. It is not about opening the txn after I get the list, the call to get the valid txn list happens after we might open a transaction in Driver#compile (L595) (I have not changed that). We hit the assertion when we have not open a transaction yet at all (for instance, first line to execute in the test is 'use databasex;'). For safety, I can keep the assertion, and only create the valid txn list if we have already opened a transaction in the system. Does it sound reasonable? > Define ValidTxnList before starting query optimization > ------------------------------------------------------ > > Key: HIVE-18825 > URL: https://issues.apache.org/jira/browse/HIVE-18825 > Project: Hive > Issue Type: Improvement > Components: Transactions > Affects Versions: 3.0.0 > Reporter: Jesus Camacho Rodriguez > Assignee: Jesus Camacho Rodriguez > Priority: Major > Attachments: HIVE-18825.01.patch, HIVE-18825.patch > > > Consider a set of tables used by a materialized view where inserts happened > after the materialization was created. To compute incremental view > maintenance, we need to be able to filter only new rows from those base > tables. That can be done by inserting a filter operator with condition e.g. > {{ROW\_\_ID.transactionId < highwatermark and ROW\_\_ID.transactionId NOT > IN(<open txns>)}} on top of the MVs query definition and triggering the > rewriting (which should in turn produce a partial rewriting). However, to do > that, we need to have a value for {{ValidTxnList}} during query compilation > so we know the snapshot that we are querying. > This patch aims to generate {{ValidTxnList}} before query optimization. There > should not be any visible changes for end user. -- This message was sent by Atlassian JIRA (v7.6.3#76005)