[jira] [Commented] (SPARK-4232) Truncate table not works when specific the table from non-current database session

2014-11-05 Thread XiaoJing wang (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-4232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14197986#comment-14197986
 ] 

XiaoJing wang commented on SPARK-4232:
--

This bug is also found in the hive.Need to modify the hive code.

 Truncate table not works when specific the table from non-current database 
 session
 --

 Key: SPARK-4232
 URL: https://issues.apache.org/jira/browse/SPARK-4232
 Project: Spark
  Issue Type: Bug
  Components: SQL
Affects Versions: 1.1.0
Reporter: shengli
Priority: Minor
 Fix For: 1.1.1, 1.2.0


 Currently the truncate table works fine in the situation that current table 
 is in the corresponding database session. But it doesn't work in the scenario 
 which the table is not in the corresponding database session. 
 What I mean is :
 Assume we have two database:default, dw. A table named test_table in database 
 dw
 By default we login as default database session. So I run:
 use dw;
 truncate table test_table [partions..];  is OK.
 If I just use the default database default to run:
 use default;
 truncate table dw.test_table;
 It will throw exception
 Failed to parse: truncate table dw.test_table.
  line 1:17 missing EOF at '.' near 'dw'
 It's a bug when parsing the truncate table xxx



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

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Commented] (SPARK-4232) Truncate table not works when specific the table from non-current database session

2014-11-05 Thread shengli (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-4232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14198430#comment-14198430
 ] 

shengli commented on SPARK-4232:


There is also a workaround with modify hive code, you can extract the database 
name , and separate this into two steps.
First change database, Second execute truncate table.

 Truncate table not works when specific the table from non-current database 
 session
 --

 Key: SPARK-4232
 URL: https://issues.apache.org/jira/browse/SPARK-4232
 Project: Spark
  Issue Type: Bug
  Components: SQL
Affects Versions: 1.1.0
Reporter: shengli
Priority: Minor
 Fix For: 1.1.1, 1.2.0


 Currently the truncate table works fine in the situation that current table 
 is in the corresponding database session. But it doesn't work in the scenario 
 which the table is not in the corresponding database session. 
 What I mean is :
 Assume we have two database:default, dw. A table named test_table in database 
 dw
 By default we login as default database session. So I run:
 use dw;
 truncate table test_table [partions..];  is OK.
 If I just use the default database default to run:
 use default;
 truncate table dw.test_table;
 It will throw exception
 Failed to parse: truncate table dw.test_table.
  line 1:17 missing EOF at '.' near 'dw'
 It's a bug when parsing the truncate table xxx



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

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org