INSERT INTO hive_table SELECT b.id,a.id FROM hive_table_1 a,hive_table_2 b WHERE a.id BETWEEN b.id1 AND b.id2;
execute such SQL on spark-sql got errors:
ERROR CliDriver: org.apache.spark.sql.AnalysisException: missing TABLE at 'hive_table' near '<EOF>'; line 1 pos 12
at org.apache.spark.sql.hive.HiveQl$.createPlan(HiveQl.scala:289)
at org.apache.spark.sql.hive.ExtendedHiveQlParser$$anonfun$hiveQl$1.apply(ExtendedHiveQlParser.scala:41)
at org.apache.spark.sql.hive.ExtendedHiveQlParser$$anonfun$hiveQl$1.apply(ExtendedHiveQlParser.scala:40)
But run ok in hive-cli or beeline. Any suggestions?