我用 ORC 创建了一个配置单元表。如果我从配置单元控制台插入数据,它可以完美运行。但是如果我从 Jdbc 代码插入数据。它会引发配置单元语义异常。
错误
rg.apache.hive.service.cli.HiveSQLException:编译语句时出错:失败:SemanticException [错误 10293]:无法为插入值创建临时文件插入/值 org.apache.hive.service 中不支持 TOK_TABLE_OR_COL 类型的表达式.cli.operation.Operation.toSQLException(Operation.java:326) org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:102) org.apache.hive.service.cli.operation.SQLOperation .runInternal(SQLOperation.java:171) org.apache.hive.service.cli.operation.Operation.run(Operation.java:268) org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java :410) org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:397) sun.reflect.GeneratedMethodAccessor24。调用(未知来源) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.apache.hive.service.cli.session.HiveSessionProxy.invoke (HiveSessionProxy.java:78) org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36) org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java :63) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAs(Subject.java:415) org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671) org. apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59) com.sun.proxy.$Proxy25.executeStatementAsync(Unknown Source) org.apache.hive.service.cli。CLIService.executeStatementAsync(CLIService.java:258) org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:509) org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement。 getResult(TCLIService.java:1313) org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1298) org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56) org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run( TThreadPoolServer.java:285) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker。运行(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:745)
我的插入查询
result = name+","+age+","+job;
String stmt = "INSERT INTO table real_estate.addressinformation_orc VALUES(" + result + ")";
任何帮助将不胜感激。