File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
sql/hive/src/main/scala/org/apache/spark/sql/hive Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ private[hive] object HiveQl {
122122 protected val noExplainCommands = Seq (
123123 " TOK_CREATETABLE" ,
124124 " TOK_DESCTABLE" ,
125+ // truncate table" is a NativeCommand, does not need to explain.
125126 " TOK_TRUNCATETABLE"
126127 ) ++ nativeCommands
127128
@@ -473,6 +474,7 @@ private[hive] object HiveQl {
473474 // If its not a "CREATE TABLE AS" like above then just pass it back to hive as a native command.
474475 case Token (" TOK_CREATETABLE" , _) => NativePlaceholder
475476
477+ // "TRUNCATE TABLE table_name COLUMNS()" is not a Hive native command for it needs to run hive mapreduce.
476478 case Token (" TOK_TRUNCATETABLE" ,
477479 Token (" TOK_TABLE_PARTITION" ,table):: Nil ) => NativePlaceholder
478480
You can’t perform that action at this time.
0 commit comments