crash icon indicating copy to clipboard operation
crash copied to clipboard

Toggle verbose mode in prompt does not work

Open mikethebeer opened this issue 9 years ago • 0 comments

Switching to verbose mode in the prompt does not seem to work properly.

Steps to reproduce:

cr> insert into t (p, ['a']) values (1, 'foo');
SQLActionException[ClassCastException: io.crate.sql.tree.TableFunction cannot be cast to io.crate.sql.tree.Table]
cr> \verbose
Verbose ON
cr> insert into t (p, ['a']) values (1, 'foo');
SQLActionException[ClassCastException: io.crate.sql.tree.TableFunction cannot be cast to io.crate.sql.tree.Table]
cr>                                                                                                                                                                                            
Bye!
crate|master ⇒ crash -v
+-----------------------+-----------+---------+-----------+---------+
| server_url            | node_name | version | connected | message |
+-----------------------+-----------+---------+-----------+---------+
| http://localhost:4200 | Graunock  | 2.1.1   | TRUE      | OK      |
+-----------------------+-----------+---------+-----------+---------+
CONNECT OK
Failed Check | You are currently using the Enterprise Edition, but have not configured a license. Please request a license or deactivate the Enterprise Edition. https://crate.io/enterprise
--------------------------------------------------------------------------------

1 CLUSTER CHECK FAILED
TYPES OF NODE CHECK OK
cr> insert into t (p, ['a']) values (1, 'foo');
SQLActionException[ClassCastException: io.crate.sql.tree.TableFunction cannot be cast to io.crate.sql.tree.Table]

SQLActionException: INTERNAL_SERVER_ERROR 5000 ClassCastException: io.crate.sql.tree.TableFunction cannot be cast to io.crate.sql.tree.Table
	at io.crate.sql.parser.AstBuilder.visitInsert(AstBuilder.java:397)
	at io.crate.sql.parser.AstBuilder.visitInsert(AstBuilder.java:174)
	at io.crate.sql.parser.antlr.v4.SqlBaseParser$InsertContext.accept(SqlBaseParser.java:455)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:42)
	at io.crate.sql.parser.AstBuilder.visitSingleStatement(AstBuilder.java:184)
	at io.crate.sql.parser.AstBuilder.visitSingleStatement(AstBuilder.java:174)
	at io.crate.sql.parser.antlr.v4.SqlBaseParser$SingleStatementContext.accept(SqlBaseParser.java:247)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:42)
	at io.crate.sql.parser.SqlParser.invokeParser(SqlParser.java:122)
	at io.crate.sql.parser.SqlParser.generateStatement(SqlParser.java:68)
	at io.crate.sql.parser.SqlParser.createStatement(SqlParser.java:64)
	at io.crate.action.sql.SQLOperations$Session.parse(SQLOperations.java:223)
	at io.crate.rest.action.RestSQLAction.executeSimpleRequest(RestSQLAction.java:163)
	at io.crate.rest.action.RestSQLAction.prepareRequest(RestSQLAction.java:129)
	at org.elasticsearch.rest.BaseRestHandler.handleRequest(BaseRestHandler.java:66)
	at io.crate.rest.CrateRestMainAction$RestFilter.handleRequest(CrateRestMainAction.java:247)
	at org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:162)
	at org.elasticsearch.http.HttpServer.dispatchRequest(HttpServer.java:115)
	at io.crate.protocols.http.CrateNettyHttpServerTransport.lambda$httpServerAdapter$0(CrateNettyHttpServerTransport.java:70)
	at org.elasticsearch.http.netty4.Netty4HttpServerTransport.dispatchRequest(Netty4HttpServerTransport.java:515)
	at org.elasticsearch.http.netty4.Netty4HttpRequestHandler.channelRead0(Netty4HttpRequestHandler.java:70)
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at org.elasticsearch.http.netty4.pipelining.HttpPipeliningHandler.channelRead(HttpPipeliningHandler.java:65)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.crate.protocols.http.HttpBlobHandler.channelRead0(HttpBlobHandler.java:162)
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	at java.lang.Thread.run(Thread.java:745)

mikethebeer avatar Jul 21 '17 07:07 mikethebeer