[
https://issues.apache.org/jira/browse/HIVE-805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748631#action_12748631
]
Prasad Chakka commented on HIVE-805:
------------------------------------
# can you rename 'test' mode to 'temporary' mode or something like that? test
here should mean either dry-run or temporary.
# this patch tries to allow creation of a partition of a regular table in
temporary store. i am sure that it fails. i don't think there is a good
solution at all since the metastore requires the table to exist before creating
a partition. should we allow this at all? if we need it then we may have to
redesign this.
# once a session table is created, a table parameter should identify that as
such. this can be done by adding that parameter before creating the table in
session metastore. alter_table etc that take in a table object should depend on
this table instead of trying to alter both metastores.
# if ignoreUnknownTab=true then a NoSuchObjectException will not be thrown. so
the below code will be incorrect.
{code}
boolean tableDropped = false;
if (this.conf.getBoolVar(HiveConf.ConfVars.HIVESESSIONTEST)) {
try {
getSessionMSC().dropTable(dbName, tableName, deleteData, ignoreUnknownTab);
tableDropped = true;
}
catch (NoSuchObjectException e) {
// Ignore if the table is not found
}
}
if (!tableDropped)
getMSC().dropTable(dbName, tableName, deleteData, ignoreUnknownTab);
{code}
this pattern can be rewritten as
{code}
if (this.conf.getBoolVar(HiveConf.ConfVars.HIVESESSIONTEST)) {
try {
getSessionMSC().dropTable(dbName, tableName, deleteData, ignoreUnknownTab);
}
catch (NoSuchObjectException e) {
getMSC().dropTable(dbName, tableName, deleteData, ignoreUnknownTab);
}
}
{code}
> Session level metastore
> -----------------------
>
> Key: HIVE-805
> URL: https://issues.apache.org/jira/browse/HIVE-805
> Project: Hadoop Hive
> Issue Type: New Feature
> Components: Query Processor
> Affects Versions: 0.2.0
> Reporter: Ashish Thusoo
> Assignee: Ashish Thusoo
> Fix For: 0.5.0
>
> Attachments: HIVE-805.patch
>
>
> Implement a shadow metastore that is in memory and runs for a session. This
> can contain definitions for session specific views that can be used to
> implement data flow variables in Hive. It can also be used for testing
> scripts. First we will support the later use case where in all the DDL
> statements in the session create objects in the session metastore and all the
> queries are converted to explain internal. Any thoughts on load commands?
> This feature is enabled when
> set hive.session.test = true
> is done in the session.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.