[ https://issues.apache.org/jira/browse/HIVE-28674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17907125#comment-17907125 ]
Raghav Aggarwal commented on HIVE-28674: ---------------------------------------- reducing the priority as workaround is available i.e. when cbo is enabled > MV creation having partition on clause fails when cbo is false > -------------------------------------------------------------- > > Key: HIVE-28674 > URL: https://issues.apache.org/jira/browse/HIVE-28674 > Project: Hive > Issue Type: Bug > Reporter: Raghav Aggarwal > Assignee: Raghav Aggarwal > Priority: Minor > Attachments: repro.sql > > > Attaching q file to reproduce the issue on master > (f44e1beacb0d8f115c2a0b6d8c88088537aa2e15) branch. > Stacktrace: > {code:java} > 2024-12-19 22:39:51,265 ERROR thrift.ThriftCLIService: Failed to execute > statement [request: > TExecuteStatementReq(sessionHandle:TSessionHandle(sessionId:THandleIdentifier(guid:9B > 9D 01 B6 88 5B 40 F4 A5 59 E1 5A 0C 20 A4 F6, secret:13 B6 05 75 1B 9B 44 FD > 91 B1 8A BC CC FE EC 39)), statement:create materialized view mv1 disable > rewrite partitioned on (deptno) as select * from emps where empid < 150, > confOverlay:{}, runAsync:true, queryTimeout:0)] > org.apache.hive.service.cli.HiveSQLException: Error while compiling > statement: FAILED: SemanticException 1:86 The number of columns produced by > the SELECT clause does not match the number of column names specified by > CREATE VIEW. Error encountered near token '150'; Query ID: > raghav_20241219223951_e95d229a-2e82-4e27-a131-3cace6bdbd0f > at > org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:376) > at > org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:212) > at > org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:268) > at org.apache.hive.service.cli.operation.Operation.run(Operation.java:286) > at > org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:558) > at > org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:543) > at > org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:316) > at > org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:652) > at > org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1670) > at > org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1650) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38) > at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38) > at > org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56) > at > org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:250) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:750) > Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: 1:86 The number > of columns produced by the SELECT clause does not match the number of column > names specified by CREATE VIEW. Error encountered near token '150' > at > org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.saveViewDefinition(SemanticAnalyzer.java:13426) > at > org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:13274) > at > org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12669) > at > org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:332) > at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:224) > at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:109) > at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:499) > at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:451) > at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:415) > at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:409) > at > org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126) > at > org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:205) > ... 15 more {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)