sql = cache table table1 as select * from table3;
code:
SQLStatementParser parser = SQLParserUtils.createSQLStatementParser(sql, JdbcUtils.HIVE);
SQLStatement sqlStatement = parser.parseStatement();
error:
com.alibaba.druid.sql.parser.ParserException: syntax error, error in :'cache table table1 as select *, pos 5, line 1, column 1, token IDENTIFIER cache
at com.alibaba.druid.sql.parser.SQLParser.printError(SQLParser.java:576) ~[druid-1.2.6.jar:1.2.6]
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:602) ~[druid-1.2.6.jar:1.2.6]
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatement(SQLStatementParser.java:4535) ~[druid-1.2.6.jar:1.2.6]
2条答案
按热度按时间5sxhfpxr1#
语法文档链接提供一下
a8jjtwal2#
语法文档链接提供一下
不好意思,cache table 和 uncache table 好像不属于 Hive,是Spark SQL的语法
语法文档: http://spark.apache.org/docs/latest/sql-ref-syntax-aux-cache-cache-table.html
不知道类似这种如何处理