Nikhil Gupta created HIVE-24174:
-----------------------------------

             Summary: Create Table command fails for a JOIN query
                 Key: HIVE-24174
                 URL: https://issues.apache.org/jira/browse/HIVE-24174
             Project: Hive
          Issue Type: Bug
          Components: Hive, HiveServer2
            Reporter: Nikhil Gupta
            Assignee: Nikhil Gupta


When creating a table over results of a join query the command fails with 
following exception:

 
{code:java}
0: jdbc:hive2://zk1-nikhil.q5dzd3jj30bupgln50> create temporary table temp as 
(select * from textTable a join texttable b);
Error: Error while compiling statement: FAILED: SemanticException [Error 
10036]: Duplicate column name: semiotic_class (state=42000,code=10036)
0: jdbc:hive2://zk1-nikhil.q5dzd3jj30bupgln50> create table temp as (select * 
from textTable a join texttable b);
Error: Error while compiling statement: FAILED: SemanticException [Error 
10036]: Duplicate column name: semiotic_class (state=42000,code=10036){code}

{{Full Stacktrace:}}



 
{noformat}
2020-09-17T08:35:08,528 ERROR [5cf31486-eb7d-4023-b0c8-4f32a6847945 
HiveServer2-HttpHandler-Pool: Thread-11353] ql.Driver: FAILED: 
SemanticException [Error 10036]: Duplicate column name: semiotic_class
org.apache.hadoop.hive.ql.parse.SemanticException: Duplicate column name: 
semiotic_class
        at 
org.apache.hadoop.hive.ql.parse.ParseUtils.validateColumnNameUniqueness(ParseUtils.java:141)
        at 
org.apache.hadoop.hive.ql.plan.CreateTableDesc.validate(CreateTableDesc.java:551)
        at 
org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:329)
        at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12481)
        at 
org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:361)
        at 
org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:289)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:664)
        at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1869)
        at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1816)
        at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1811)
        at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
        at 
org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:197)
        at 
org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:262)
        at 
org.apache.hive.service.cli.operation.Operation.run(Operation.java:260)
        at 
org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:575)
        at 
org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:561)
        at 
org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:315)
        at 
org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:566)
        at 
org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1557)
        at 
org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1542)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
        at org.apache.thrift.server.TServlet.doPost(TServlet.java:83)
        at 
org.apache.hive.service.cli.thrift.ThriftHttpServlet.doPost(ThriftHttpServlet.java:208)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
        at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
        at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:513)
        at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at 
org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:493)
        at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
        at org.eclipse.jetty.server.Server.handle(Server.java:539)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333)
        at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
        at 
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
        at 
org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
        at 
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
        at 
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
        at 
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
        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:748){noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to