{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/presto/issues/2209","labels_url":"https://api.github.com/repos/facebook/presto/issues/2209/labels{/name}","comments_url":"https://api.github.com/repos/facebook/presto/issues/2209/comments","events_url":"https://api.github.com/repos/facebook/presto/issues/2209/events","html_url":"https://github.com/facebook/presto/issues/2209","id":53897667,"number":2209,"title":"Casting -infinity to bigint fails","user":{"login":"nezihyigitbasi","id":1223839,"avatar_url":"https://avatars.githubusercontent.com/u/1223839?v=3","gravatar_id":"","url":"https://api.github.com/users/nezihyigitbasi","html_url":"https://github.com/nezihyigitbasi","followers_url":"https://api.github.com/users/nezihyigitbasi/followers","following_url":"https://api.github.com/users/nezihyigitbasi/following{/other_user}","gists_url":"https://api.github.com/users/nezihyigitbasi/gists{/gist_id}","starred_url":"https://api.github.com/users/nezihyigitbasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nezihyigitbasi/subscriptions","organizations_url":"https://api.github.com/users/nezihyigitbasi/orgs","repos_url":"https://api.github.com/users/nezihyigitbasi/repos","events_url":"https://api.github.com/users/nezihyigitbasi/events{/privacy}","received_events_url":"https://api.github.com/users/nezihyigitbasi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-09T18:17:11Z","updated_at":"2015-01-09T18:27:32Z","closed_at":null,"body":"This one works\r\n```\r\npresto:default> select cast(infinity() as bigint);\r\n        _col0        \r\n---------------------\r\n 9223372036854775807 \r\n(1 row)\r\n\r\nQuery 20150109_181636_00104_segad, FINISHED, 1 node\r\nhttp://localhost:8080/v1/query/20150109_181636_00104_segad?pretty\r\nSplits: 1 total, 1 done (100.00%)\r\nCPU Time: 0.0s total,     0 rows/s,     0B/s, 0% active\r\nPer Node: 0.0 parallelism,     0 rows/s,     0B/s\r\nParallelism: 0.0\r\n0:00 [0 rows, 0B] [0 rows/s, 0B/s]\r\n```\r\n\r\nThis one doesn't. At least it should fail gracefully.\r\n```\r\npresto:default> select cast(-infinity() as bigint);\r\nQuery 20150109_181638_00105_segad failed: Unable to create class com.facebook.presto.execution.TaskInfo from JSON response:\r\nio.airlift.jaxrs.JsonMapperParsingException: Invalid json for Java type com.facebook.presto.server.TaskUpdateRequest\r\n\tat io.airlift.jaxrs.JsonMapper.readFrom(JsonMapper.java:162)\r\n\tat org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:258)\r\n\tat org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:234)\r\n\tat org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:154)\r\n\tat org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundReadFrom(MappableExceptionWrapperInterceptor.java:73)\r\n\tat org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:154)\r\n\tat org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1124)\r\n\tat org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:851)\r\n\tat org.glassfish.jersey.server.ContainerRequest.readEntity(ContainerRequest.java:270)\r\n\tat org.glassfish.jersey.server.internal.inject.EntityParamValueFactoryProvider$EntityValueFactory.provide(EntityParamValueFactoryProvider.java:96)\r\n\tat org.glassfish.jersey.server.spi.internal.ParameterValueHelper.getParameterValues(ParameterValueHelper.java:81)\r\n\tat org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$AbstractMethodParamInvoker.getParamValues(JavaResourceMethodDispatcherProvider.java:121)\r\n\tat org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)\r\n\tat org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)\r\n\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387)\r\n\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331)\r\n\tat org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103)\r\n\tat org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)\r\n\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)\r\n\tat org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)\r\n\tat org.glassfish.jersey.internal.Errors.process(Errors.java:315)\r\n\tat org.glassfish.jersey.internal.Errors.process(Errors.java:297)\r\n\tat org.glassfish.jersey.internal.Errors.process(Errors.java:267)\r\n\tat org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)\r\n\tat org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)\r\n\tat org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1030)\r\n\tat org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373)\r\n\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)\r\n\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)\r\n\tat org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)\r\n\tat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1667)\r\n\tat org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83)\r\n\tat org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)\r\n\tat io.airlift.http.server.TraceTokenFilter.doFilter(TraceTokenFilter.java:62)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)\r\n\tat io.airlift.http.server.TimingFilter.doFilter(TimingFilter.java:51)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\r\n\tat org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159)\r\n\tat org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\r\n\tat org.eclipse.jetty.server.Server.handle(Server.java:485)\r\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:290)\r\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)\r\n\tat org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:606)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:535)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: com.fasterxml.jackson.databind.JsonMappingException: line 1:1: Invalid numeric literal: 9223372036854775808 (through reference chain: java.util.LinkedHashMap[\"expr\"])\r\n\tat com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:210)\r\n\tat com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:177)\r\n\tat com.fasterxml.jackson.databind.deser.std.MapDeserializer.wrapAndThrow(MapDeserializer.java:566)\r\n\tat com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBind(MapDeserializer.java:420)\r\n\tat com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:323)\r\n\tat com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:26)\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/presto/issues/comments/69376222","html_url":"https://github.com/facebook/presto/issues/2209#issuecomment-69376222","issue_url":"https://api.github.com/repos/facebook/presto/issues/2209","id":69376222,"user":{"login":"nezihyigitbasi","id":1223839,"avatar_url":"https://avatars.githubusercontent.com/u/1223839?v=3","gravatar_id":"","url":"https://api.github.com/users/nezihyigitbasi","html_url":"https://github.com/nezihyigitbasi","followers_url":"https://api.github.com/users/nezihyigitbasi/followers","following_url":"https://api.github.com/users/nezihyigitbasi/following{/other_user}","gists_url":"https://api.github.com/users/nezihyigitbasi/gists{/gist_id}","starred_url":"https://api.github.com/users/nezihyigitbasi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nezihyigitbasi/subscriptions","organizations_url":"https://api.github.com/users/nezihyigitbasi/orgs","repos_url":"https://api.github.com/users/nezihyigitbasi/repos","events_url":"https://api.github.com/users/nezihyigitbasi/events{/privacy}","received_events_url":"https://api.github.com/users/nezihyigitbasi/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T18:27:32Z","updated_at":"2015-01-09T18:27:32Z","body":"Yep, I understand why it fails. It would be nice if it failed more gracefully."}}