Returning csv has some restrictions, especially when using a header. There's a new page in the documentation that covers all that; I'm not sure that the website has that page yet, but it will be generated in your local build and I've also put it online here: http://www.hillery.land/site/csv.html
So it's not surprising to me that this didn't work for you. However it certainly shouldn't throw an NPE, so we should at the least introduce a better exception there. Ceej aka Chris Hillery On May 31, 2015 10:35 AM, "chandresh pancholi" < [email protected]> wrote: > Hi, > > I was playing with AsterixDB Query UI. There are 4 options to generate > Output. > > query is : let $message := 'Hie' > return $message > When i tried selecting Output format CSV with header. It was throwing Null > pointer exception. > > It would be great if someone can help me out to debug this issue. > > Here is the Stack trace. > java.lang.NullPointerException > at > > edu.uci.ics.asterix.result.ResultUtils.displayCSVHeader(ResultUtils.java:72) > at > > edu.uci.ics.asterix.aql.translator.AqlTranslator.handleQuery(AqlTranslator.java:2197) > at > > edu.uci.ics.asterix.aql.translator.AqlTranslator.compileAndExecute(AqlTranslator.java:333) > at > edu.uci.ics.asterix.api.http.servlet.APIServlet.doPost(APIServlet.java:111) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483) > at > > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:228) > at > > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:956) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:411) > at > > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:188) > at > > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:891) > at > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) > at > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) > at org.eclipse.jetty.server.Server.handle(Server.java:353) > at > > org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:598) > at > > org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1076) > at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805) > at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218) > at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:427) > at > > org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510) > at > > org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34) > at > > org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) > at > > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450) > at java.lang.Thread.run(Thread.java:745) > May 31, 2015 11:02:58 PM edu.uci.ics.asterix.api.http.servlet.APIServlet > doPost > SEVERE: null > java.lang.NullPointerException > at > > edu.uci.ics.asterix.result.ResultUtils.displayCSVHeader(ResultUtils.java:72) > at > > edu.uci.ics.asterix.aql.translator.AqlTranslator.handleQuery(AqlTranslator.java:2197) > at > > edu.uci.ics.asterix.aql.translator.AqlTranslator.compileAndExecute(AqlTranslator.java:333) > at > edu.uci.ics.asterix.api.http.servlet.APIServlet.doPost(APIServlet.java:111) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:546) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483) > at > > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:228) > at > > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:956) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:411) > at > > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:188) > at > > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:891) > at > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) > at > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) > at org.eclipse.jetty.server.Server.handle(Server.java:353) > at > > org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:598) > at > > org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1076) > at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805) > at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218) > at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:427) > at > > org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510) > at > > org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34) > at > > org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) > at > > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450) > at java.lang.Thread.run(Thread.java:745) > > -- > Chandresh Pancholi > Senior Software Engineer > Flipkart.com > Email-id:[email protected] > Contact:08951803660 >
