Skip to content

Commit 7a03707

Browse files
committed
add comment
1 parent f6e710e commit 7a03707

File tree

1 file changed

+2
-0
lines changed
  • sql/hive/src/main/scala/org/apache/spark/sql/hive

1 file changed

+2
-0
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)