[jira] [Commented] (HIVE-15506) Problem with creating table in hive

2017-03-09 Thread Fan Yunbo (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-15506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15904345#comment-15904345
 ] 

Fan Yunbo commented on HIVE-15506:
--

could you attach the log file for the further info?

> Problem with creating table in hive
> ---
>
> Key: HIVE-15506
> URL: https://issues.apache.org/jira/browse/HIVE-15506
> Project: Hive
>  Issue Type: Bug
>  Components: Database/Schema
>Affects Versions: 2.1.0
> Environment: windows
>Reporter: Maher Hattabi
>Assignee: Maher Hattabi
>Priority: Blocker
>
> HI 
> Am using Apache Hive 2.1.0 version under windows.I've deployed hive under 
> windows using MySQL as metastore .Am able to launch the hive shell.Once done 
> ,i am able to create databases,show tables but am not able to create table 
> ,i've struggled to be able to do it but i couldn't.
> I've got this bug"
> Error org.apache.hive.ql.exec.DDLTask.MetaException connections,we don't support retries at the client level>
> Please find the hive-site.xml in this url.
> http://www.mediafire.com/file/9864d5o308h6pk4/hive-site.xml
> Please am not able to do anything ,thanks for your help.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"

2016-09-11 Thread Fan Yunbo (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15481681#comment-15481681
 ] 

Fan Yunbo commented on HIVE-14686:
--

thanks for you review.

> 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] [Commented] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"

2016-09-09 Thread Fan Yunbo (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15476439#comment-15476439
 ] 

Fan Yunbo commented on HIVE-14686:
--

[~ruili] Thanks for your advice again.
The braces of if statement have been added.

> 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"

2016-09-09 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-09 Thread Fan Yunbo (JIRA)

 [ 
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] [Commented] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"

2016-09-09 Thread Fan Yunbo (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15476358#comment-15476358
 ] 

Fan Yunbo commented on HIVE-14686:
--

[~ruili]Thanks for apply so quickly.
Sorry for misunderstanding.
Update again.

> 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"

2016-09-09 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-09 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-09 Thread Fan Yunbo (JIRA)

 [ 
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] [Commented] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"

2016-09-09 Thread Fan Yunbo (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15476187#comment-15476187
 ] 

Fan Yunbo commented on HIVE-14686:
--

[~ruili] 
I also thank so and I update the patch.
It's really nice of you to review it again. 

> 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"

2016-09-09 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-09 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-09 Thread Fan Yunbo (JIRA)

 [ 
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] [Commented] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"

2016-09-07 Thread Fan Yunbo (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15472336#comment-15472336
 ] 

Fan Yunbo commented on HIVE-14686:
--

[~ruili] Agree with you and thanks for your advice.
I made a change:
set command type once the value of command_type decided;
change related tests output files.
And these failure tests seems not related.


> 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"

2016-09-07 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-07 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-07 Thread Fan Yunbo (JIRA)

 [ 
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] [Commented] (HIVE-14686) Get unexpected command type when execute query "CREATE TABLE IF NOT EXISTS ... AS"

2016-09-04 Thread Fan Yunbo (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15463963#comment-15463963
 ] 

Fan Yunbo commented on HIVE-14686:
--

thank you for your reply [~ruili]
I hava changed the code to the latest and the issue still exists.
Here is the debug info when execute the query. 
{code}
42a5ec91-6a86-4480-84fc-c892029b498f main[1] print queryState.getCommandType()
 queryState.getCommandType() = "CREATETABLE"
{code}
I hava update the patch.
Could you please review it again, thank you.

> 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"

2016-09-02 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-02 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-02 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-01 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-01 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-01 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-01 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-01 Thread Fan Yunbo (JIRA)

 [ 
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"

2016-09-01 Thread Fan Yunbo (JIRA)

 [ 
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)


[jira] [Commented] (HIVE-14659) OutputStream won't close if caught exception in funtion unparseExprForValuesClause in SemanticAnalyzer.java

2016-08-27 Thread Fan Yunbo (JIRA)

[ 
https://issues.apache.org/jira/browse/HIVE-14659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15442555#comment-15442555
 ] 

Fan Yunbo commented on HIVE-14659:
--

[~prasanth_j][~sershe] Can someone please review this small patch?

> OutputStream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java
> ---
>
> Key: HIVE-14659
> URL: https://issues.apache.org/jira/browse/HIVE-14659
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.1.0
>Reporter: Fan Yunbo
>Assignee: Fan Yunbo
> Fix For: 2.2.0
>
> Attachments: HIVE-14659.1.patch
>
>
> I hava met the problem that Hive process cannot create new threads because of 
> lots of OutputStream not closed.
> Here is the part of jstack info:
> "Thread-35783" daemon prio=10 tid=0x7f8f58f02800 nid=0x18cc in 
> Object.wait() [0x7f8e632c]
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> at 
> org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:577)
> - locked <0x00061af52d50> (a java.util.LinkedList)
> and the related error log:
> org.apache.hadoop.hive.ql.parse.SemanticException: Unable to create temp file 
> for insert values Expression of type TOK_TABLE_OR_COL not supported in 
> insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:812)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1207)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1410)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10136)
> Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Expression of 
> type TOK_TABLE_OR_COL not supported in insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.unparseExprForValuesClause(SemanticAnalyzer.java:858)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:785)
> ... 15 more
> It shows the output stream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14659) OutputStream won't close if caught exception in funtion unparseExprForValuesClause in SemanticAnalyzer.java

2016-08-27 Thread Fan Yunbo (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fan Yunbo updated HIVE-14659:
-
Status: Patch Available  (was: In Progress)

> OutputStream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java
> ---
>
> Key: HIVE-14659
> URL: https://issues.apache.org/jira/browse/HIVE-14659
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.1.0
>Reporter: Fan Yunbo
>Assignee: Fan Yunbo
> Fix For: 2.2.0
>
> Attachments: HIVE-14659.1.patch
>
>
> I hava met the problem that Hive process cannot create new threads because of 
> lots of OutputStream not closed.
> Here is the part of jstack info:
> "Thread-35783" daemon prio=10 tid=0x7f8f58f02800 nid=0x18cc in 
> Object.wait() [0x7f8e632c]
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> at 
> org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:577)
> - locked <0x00061af52d50> (a java.util.LinkedList)
> and the related error log:
> org.apache.hadoop.hive.ql.parse.SemanticException: Unable to create temp file 
> for insert values Expression of type TOK_TABLE_OR_COL not supported in 
> insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:812)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1207)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1410)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10136)
> Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Expression of 
> type TOK_TABLE_OR_COL not supported in insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.unparseExprForValuesClause(SemanticAnalyzer.java:858)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:785)
> ... 15 more
> It shows the output stream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work started] (HIVE-14659) OutputStream won't close if caught exception in funtion unparseExprForValuesClause in SemanticAnalyzer.java

2016-08-27 Thread Fan Yunbo (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on HIVE-14659 started by Fan Yunbo.

> OutputStream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java
> ---
>
> Key: HIVE-14659
> URL: https://issues.apache.org/jira/browse/HIVE-14659
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.1.0
>Reporter: Fan Yunbo
>Assignee: Fan Yunbo
> Fix For: 2.2.0
>
> Attachments: HIVE-14659.1.patch
>
>
> I hava met the problem that Hive process cannot create new threads because of 
> lots of OutputStream not closed.
> Here is the part of jstack info:
> "Thread-35783" daemon prio=10 tid=0x7f8f58f02800 nid=0x18cc in 
> Object.wait() [0x7f8e632c]
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> at 
> org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:577)
> - locked <0x00061af52d50> (a java.util.LinkedList)
> and the related error log:
> org.apache.hadoop.hive.ql.parse.SemanticException: Unable to create temp file 
> for insert values Expression of type TOK_TABLE_OR_COL not supported in 
> insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:812)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1207)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1410)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10136)
> Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Expression of 
> type TOK_TABLE_OR_COL not supported in insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.unparseExprForValuesClause(SemanticAnalyzer.java:858)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:785)
> ... 15 more
> It shows the output stream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work stopped] (HIVE-14659) OutputStream won't close if caught exception in funtion unparseExprForValuesClause in SemanticAnalyzer.java

2016-08-27 Thread Fan Yunbo (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on HIVE-14659 stopped by Fan Yunbo.

> OutputStream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java
> ---
>
> Key: HIVE-14659
> URL: https://issues.apache.org/jira/browse/HIVE-14659
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.1.0
>Reporter: Fan Yunbo
>Assignee: Fan Yunbo
> Fix For: 2.2.0
>
> Attachments: HIVE-14659.1.patch
>
>
> I hava met the problem that Hive process cannot create new threads because of 
> lots of OutputStream not closed.
> Here is the part of jstack info:
> "Thread-35783" daemon prio=10 tid=0x7f8f58f02800 nid=0x18cc in 
> Object.wait() [0x7f8e632c]
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> at 
> org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:577)
> - locked <0x00061af52d50> (a java.util.LinkedList)
> and the related error log:
> org.apache.hadoop.hive.ql.parse.SemanticException: Unable to create temp file 
> for insert values Expression of type TOK_TABLE_OR_COL not supported in 
> insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:812)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1207)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1410)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10136)
> Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Expression of 
> type TOK_TABLE_OR_COL not supported in insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.unparseExprForValuesClause(SemanticAnalyzer.java:858)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:785)
> ... 15 more
> It shows the output stream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work started] (HIVE-14659) OutputStream won't close if caught exception in funtion unparseExprForValuesClause in SemanticAnalyzer.java

2016-08-27 Thread Fan Yunbo (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on HIVE-14659 started by Fan Yunbo.

> OutputStream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java
> ---
>
> Key: HIVE-14659
> URL: https://issues.apache.org/jira/browse/HIVE-14659
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.1.0
>Reporter: Fan Yunbo
>Assignee: Fan Yunbo
> Fix For: 2.2.0
>
> Attachments: HIVE-14659.1.patch
>
>
> I hava met the problem that Hive process cannot create new threads because of 
> lots of OutputStream not closed.
> Here is the part of jstack info:
> "Thread-35783" daemon prio=10 tid=0x7f8f58f02800 nid=0x18cc in 
> Object.wait() [0x7f8e632c]
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> at 
> org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:577)
> - locked <0x00061af52d50> (a java.util.LinkedList)
> and the related error log:
> org.apache.hadoop.hive.ql.parse.SemanticException: Unable to create temp file 
> for insert values Expression of type TOK_TABLE_OR_COL not supported in 
> insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:812)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1207)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1410)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10136)
> Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Expression of 
> type TOK_TABLE_OR_COL not supported in insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.unparseExprForValuesClause(SemanticAnalyzer.java:858)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:785)
> ... 15 more
> It shows the output stream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14659) OutputStream won't close if caught exception in funtion unparseExprForValuesClause in SemanticAnalyzer.java

2016-08-27 Thread Fan Yunbo (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fan Yunbo updated HIVE-14659:
-
Attachment: HIVE-14659.1.patch

> OutputStream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java
> ---
>
> Key: HIVE-14659
> URL: https://issues.apache.org/jira/browse/HIVE-14659
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.1.0
>Reporter: Fan Yunbo
>Assignee: Fan Yunbo
> Fix For: 2.2.0
>
> Attachments: HIVE-14659.1.patch
>
>
> I hava met the problem that Hive process cannot create new threads because of 
> lots of OutputStream not closed.
> Here is the part of jstack info:
> "Thread-35783" daemon prio=10 tid=0x7f8f58f02800 nid=0x18cc in 
> Object.wait() [0x7f8e632c]
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> at 
> org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:577)
> - locked <0x00061af52d50> (a java.util.LinkedList)
> and the related error log:
> org.apache.hadoop.hive.ql.parse.SemanticException: Unable to create temp file 
> for insert values Expression of type TOK_TABLE_OR_COL not supported in 
> insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:812)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1207)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1410)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10136)
> Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Expression of 
> type TOK_TABLE_OR_COL not supported in insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.unparseExprForValuesClause(SemanticAnalyzer.java:858)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:785)
> ... 15 more
> It shows the output stream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14659) OutputStream won't close if caught exception in funtion unparseExprForValuesClause in SemanticAnalyzer.java

2016-08-27 Thread Fan Yunbo (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fan Yunbo updated HIVE-14659:
-
Attachment: (was: HIVE-14659.1.patch)

> OutputStream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java
> ---
>
> Key: HIVE-14659
> URL: https://issues.apache.org/jira/browse/HIVE-14659
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.1.0
>Reporter: Fan Yunbo
>Assignee: Fan Yunbo
> Fix For: 2.2.0
>
>
> I hava met the problem that Hive process cannot create new threads because of 
> lots of OutputStream not closed.
> Here is the part of jstack info:
> "Thread-35783" daemon prio=10 tid=0x7f8f58f02800 nid=0x18cc in 
> Object.wait() [0x7f8e632c]
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> at 
> org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:577)
> - locked <0x00061af52d50> (a java.util.LinkedList)
> and the related error log:
> org.apache.hadoop.hive.ql.parse.SemanticException: Unable to create temp file 
> for insert values Expression of type TOK_TABLE_OR_COL not supported in 
> insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:812)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1207)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1410)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10136)
> Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Expression of 
> type TOK_TABLE_OR_COL not supported in insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.unparseExprForValuesClause(SemanticAnalyzer.java:858)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:785)
> ... 15 more
> It shows the output stream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-14659) OutputStream won't close if caught exception in funtion unparseExprForValuesClause in SemanticAnalyzer.java

2016-08-27 Thread Fan Yunbo (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fan Yunbo updated HIVE-14659:
-
Description: 
I hava met the problem that Hive process cannot create new threads because of 
lots of OutputStream not closed.
Here is the part of jstack info:

"Thread-35783" daemon prio=10 tid=0x7f8f58f02800 nid=0x18cc in 
Object.wait() [0x7f8e632c]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at 
org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:577)
- locked <0x00061af52d50> (a java.util.LinkedList)

and the related error log:
org.apache.hadoop.hive.ql.parse.SemanticException: Unable to create temp file 
for insert values Expression of type TOK_TABLE_OR_COL not supported in 
insert/values
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:812)
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1207)
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1410)
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10136)
Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Expression of 
type TOK_TABLE_OR_COL not supported in insert/values
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.unparseExprForValuesClause(SemanticAnalyzer.java:858)
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:785)
... 15 more

It shows the output stream won't close if caught exception in funtion 
unparseExprForValuesClause in SemanticAnalyzer.java

  was:
I hava met the problem that Hive process cannot create new threads because of 
lots of OutputStream not closed.
Hear is the part of jstack info:

"Thread-35783" daemon prio=10 tid=0x7f8f58f02800 nid=0x18cc in 
Object.wait() [0x7f8e632c]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at 
org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:577)
- locked <0x00061af52d50> (a java.util.LinkedList)

and the related error log:
org.apache.hadoop.hive.ql.parse.SemanticException: Unable to create temp file 
for insert values Expression of type TOK_TABLE_OR_COL not supported in 
insert/values
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:812)
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1207)
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1410)
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10136)
Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Expression of 
type TOK_TABLE_OR_COL not supported in insert/values
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.unparseExprForValuesClause(SemanticAnalyzer.java:858)
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:785)
... 15 more

It shows the output stream won't close if caught exception in funtion 
unparseExprForValuesClause in SemanticAnalyzer.java


> OutputStream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java
> ---
>
> Key: HIVE-14659
> URL: https://issues.apache.org/jira/browse/HIVE-14659
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.1.0
>Reporter: Fan Yunbo
>Assignee: Fan Yunbo
> Fix For: 2.2.0
>
> Attachments: HIVE-14659.1.patch
>
>
> I hava met the problem that Hive process cannot create new threads because of 
> lots of OutputStream not closed.
> Here is the part of jstack info:
> "Thread-35783" daemon prio=10 tid=0x7f8f58f02800 nid=0x18cc in 
> Object.wait() [0x7f8e632c]
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> at 
> org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:577)
> - locked <0x00061af52d50> (a java.util.LinkedList)
> and the related error log:
> org.apache.hadoop.hive.ql.parse.SemanticException: Unable to create temp file 
> for insert values Expression of type TOK_TABLE_OR_COL not supported in 
> insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:812)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1207)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1410)
> at

[jira] [Updated] (HIVE-14659) OutputStream won't close if caught exception in funtion unparseExprForValuesClause in SemanticAnalyzer.java

2016-08-27 Thread Fan Yunbo (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-14659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fan Yunbo updated HIVE-14659:
-
Attachment: HIVE-14659.1.patch

> OutputStream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java
> ---
>
> Key: HIVE-14659
> URL: https://issues.apache.org/jira/browse/HIVE-14659
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 1.1.0
>Reporter: Fan Yunbo
>Assignee: Fan Yunbo
> Fix For: 2.2.0
>
> Attachments: HIVE-14659.1.patch
>
>
> I hava met the problem that Hive process cannot create new threads because of 
> lots of OutputStream not closed.
> Hear is the part of jstack info:
> "Thread-35783" daemon prio=10 tid=0x7f8f58f02800 nid=0x18cc in 
> Object.wait() [0x7f8e632c]
>java.lang.Thread.State: TIMED_WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> at 
> org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:577)
> - locked <0x00061af52d50> (a java.util.LinkedList)
> and the related error log:
> org.apache.hadoop.hive.ql.parse.SemanticException: Unable to create temp file 
> for insert values Expression of type TOK_TABLE_OR_COL not supported in 
> insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:812)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1207)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.doPhase1(SemanticAnalyzer.java:1410)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:10136)
> Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Expression of 
> type TOK_TABLE_OR_COL not supported in insert/values
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.unparseExprForValuesClause(SemanticAnalyzer.java:858)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genValuesTempTable(SemanticAnalyzer.java:785)
> ... 15 more
> It shows the output stream won't close if caught exception in funtion 
> unparseExprForValuesClause in SemanticAnalyzer.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)