[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rui Li updated HIVE-14686: -- Affects Version/s: (was: 1.1.0) 1.2.1 2.1.0 > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.2.1, 2.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch, HIVE-14686.4.patch, HIVE-14686.5.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rui Li updated HIVE-14686: -- Resolution: Fixed Status: Resolved (was: Patch Available) Committed to master. Thanks Yunbo for your contribution. > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch, HIVE-14686.4.patch, HIVE-14686.5.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Status: Patch Available (was: Open) > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch, HIVE-14686.4.patch, HIVE-14686.5.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Attachment: HIVE-14686.5.patch > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch, HIVE-14686.4.patch, HIVE-14686.5.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Attachment: HIVE-14686.4.patch > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch, HIVE-14686.4.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Attachment: (was: HIVE-14686.4.patch) > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch, HIVE-14686.4.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Status: Open (was: Patch Available) > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch, HIVE-14686.4.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Status: Patch Available (was: Open) > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch, HIVE-14686.4.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Attachment: HIVE-14686.4.patch > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch, HIVE-14686.4.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Status: Open (was: Patch Available) > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Status: Patch Available (was: Open) set command type once command_type decided; change tests output files > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Attachment: HIVE-14686.3.patch > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Status: Open (was: Patch Available) > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch, > HIVE-14686.3.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Status: Patch Available (was: Open) > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Attachment: HIVE-14686.2.patch > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch, HIVE-14686.2.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Status: Open (was: Patch Available) > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Description: See the query: {code} create table if not exists DST as select * from SRC; {code} if the table DST doesn't exist, SessionState.get().getHiveOperation() will return HiveOperation.CREATETABLE_AS_SELECT; But if the table DST already exists, it will return HiveOperation.CREATETABLE; It really makes some trouble for those who judge operation type by SessionState.get().getHiveOperation(). The reason I find out is that the function analyzeCreateTable in SemanticAnalyzer.java will return null and won't set the correct command type if the table already exists. Here is the related code: {code} // check for existence of table if (ifNotExists) { try { Table table = getTable(qualifiedTabName, false); if (table != null) { // table exists return null; } } catch (HiveException e) { // should not occur since second parameter to getTableWithQN is false throw new IllegalStateException("Unxpected Exception thrown: " + e.getMessage(), e); } } {code} was: See the query: {quote} create table if not exists DST as select * from SRC; {quote} if the table DST doesn't exist, SessionState.get().getHiveOperation() will return HiveOperation.CREATETABLE_AS_SELECT; But if the table DST already exists, it will return HiveOperation.CREATETABLE; It really makes some trouble for those who judge operation type by SessionState.get().getHiveOperation(). The reason I find out is that the function analyzeCreateTable in SemanticAnalyzer.java will return null and won't set the correct command type if the table already exists. Here is the related code: {code} // check for existence of table if (ifNotExists) { try { Table table = getTable(qualifiedTabName, false); if (table != null) { // table exists return null; } } catch (HiveException e) { // should not occur since second parameter to getTableWithQN is false throw new IllegalStateException("Unxpected Exception thrown: " + e.getMessage(), e); } } {code} > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch > > > See the query: > {code} > create table if not exists DST as select * from SRC; > {code} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Description: See the query: {quote} create table if not exists DST as select * from SRC; {quote} if the table DST doesn't exist, SessionState.get().getHiveOperation() will return HiveOperation.CREATETABLE_AS_SELECT; But if the table DST already exists, it will return HiveOperation.CREATETABLE; It really makes some trouble for those who judge operation type by SessionState.get().getHiveOperation(). The reason I find out is that the function analyzeCreateTable in SemanticAnalyzer.java will return null and won't set the correct command type if the table already exists. Here is the related code: {code} // check for existence of table if (ifNotExists) { try { Table table = getTable(qualifiedTabName, false); if (table != null) { // table exists return null; } } catch (HiveException e) { // should not occur since second parameter to getTableWithQN is false throw new IllegalStateException("Unxpected Exception thrown: " + e.getMessage(), e); } } {code} was: See the query: {quote} create table if not exists DST as select * from SRC; {quote} if the table DST doesn't exist, SessionState.get().getHiveOperation() will return HiveOperation.CREATETABLE_AS_SELECT; But if the table DST already exists, it will return HiveOperation.CREATETABLE; It really makes some trouble for those who judge operation type by SessionState.get().getHiveOperation(). The reason I find out is that the function analyzeCreateTable in SemanticAnalyzer.java will return null and won't set the correct command type if the table already exists. Here is the related code: {quote} // check for existence of table if (ifNotExists) { try { Table table = getTable(qualifiedTabName, false); if (table != null) { // table exists return null; } } catch (HiveException e) { // should not occur since second parameter to getTableWithQN is false throw new IllegalStateException("Unxpected Exception thrown: " + e.getMessage(), e); } } {quote} > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch > > > See the query: > {quote} > create table if not exists DST as select * from SRC; > {quote} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {code} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Fix Version/s: 2.2.0 > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Fix For: 2.2.0 > > Attachments: HIVE-14686.1.patch > > > See the query: > {quote} > create table if not exists DST as select * from SRC; > {quote} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {quote} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Status: Patch Available (was: Open) > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Attachments: HIVE-14686.1.patch > > > See the query: > {quote} > create table if not exists DST as select * from SRC; > {quote} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {quote} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Attachment: HIVE-14686.1.patch > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > Attachments: HIVE-14686.1.patch > > > See the query: > {quote} > create table if not exists DST as select * from SRC; > {quote} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {quote} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"
[ https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fan Yunbo updated HIVE-14686: - Description: See the query: {quote} create table if not exists DST as select * from SRC; {quote} if the table DST doesn't exist, SessionState.get().getHiveOperation() will return HiveOperation.CREATETABLE_AS_SELECT; But if the table DST already exists, it will return HiveOperation.CREATETABLE; It really makes some trouble for those who judge operation type by SessionState.get().getHiveOperation(). The reason I find out is that the function analyzeCreateTable in SemanticAnalyzer.java will return null and won't set the correct command type if the table already exists. Here is the related code: {quote} // check for existence of table if (ifNotExists) { try { Table table = getTable(qualifiedTabName, false); if (table != null) { // table exists return null; } } catch (HiveException e) { // should not occur since second parameter to getTableWithQN is false throw new IllegalStateException("Unxpected Exception thrown: " + e.getMessage(), e); } } {quote} was: See the query: create table if not exists DST as select * from SRC; if the table DST doesn't exist, SessionState.get().getHiveOperation() will return HiveOperation.CREATETABLE_AS_SELECT; But if the table DST already exists, it will return HiveOperation.CREATETABLE; It really makes some trouble for those who judge operation type by SessionState.get().getHiveOperation(). The reason I find out is that the function analyzeCreateTable in SemanticAnalyzer.java will return null and won't set the correct command type if the table already exists. Here is the related code: // check for existence of table if (ifNotExists) { try { Table table = getTable(qualifiedTabName, false); if (table != null) { // table exists return null; } } catch (HiveException e) { // should not occur since second parameter to getTableWithQN is false throw new IllegalStateException("Unxpected Exception thrown: " + e.getMessage(), e); } } > Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS > ... AS" > -- > > Key: HIVE-14686 > URL: https://issues.apache.org/jira/browse/HIVE-14686 > Project: Hive > Issue Type: Bug >Affects Versions: 1.1.0 >Reporter: Fan Yunbo >Assignee: Fan Yunbo > > See the query: > {quote} > create table if not exists DST as select * from SRC; > {quote} > if the table DST doesn't exist, SessionState.get().getHiveOperation() will > return HiveOperation.CREATETABLE_AS_SELECT; > But if the table DST already exists, it will return HiveOperation.CREATETABLE; > It really makes some trouble for those who judge operation type by > SessionState.get().getHiveOperation(). > The reason I find out is that the function analyzeCreateTable in > SemanticAnalyzer.java will return null and won't set the correct command type > if the table already exists. > Here is the related code: > {quote} > // check for existence of table > if (ifNotExists) { > try { > Table table = getTable(qualifiedTabName, false); > if (table != null) { // table exists > return null; > } > } catch (HiveException e) { > // should not occur since second parameter to getTableWithQN is false > throw new IllegalStateException("Unxpected Exception thrown: " + > e.getMessage(), e); > } > } > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)