{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/presto/issues/2477","labels_url":"https://api.github.com/repos/facebook/presto/issues/2477/labels{/name}","comments_url":"https://api.github.com/repos/facebook/presto/issues/2477/comments","events_url":"https://api.github.com/repos/facebook/presto/issues/2477/events","html_url":"https://github.com/facebook/presto/issues/2477","id":60303152,"number":2477,"title":"[bug] ORC error when push down Date type predicate","user":{"login":"yuananf","id":4101738,"avatar_url":"https://avatars.githubusercontent.com/u/4101738?v=3","gravatar_id":"","url":"https://api.github.com/users/yuananf","html_url":"https://github.com/yuananf","followers_url":"https://api.github.com/users/yuananf/followers","following_url":"https://api.github.com/users/yuananf/following{/other_user}","gists_url":"https://api.github.com/users/yuananf/gists{/gist_id}","starred_url":"https://api.github.com/users/yuananf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuananf/subscriptions","organizations_url":"https://api.github.com/users/yuananf/orgs","repos_url":"https://api.github.com/users/yuananf/repos","events_url":"https://api.github.com/users/yuananf/events{/privacy}","received_events_url":"https://api.github.com/users/yuananf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dain","id":58298,"avatar_url":"https://avatars.githubusercontent.com/u/58298?v=3","gravatar_id":"","url":"https://api.github.com/users/dain","html_url":"https://github.com/dain","followers_url":"https://api.github.com/users/dain/followers","following_url":"https://api.github.com/users/dain/following{/other_user}","gists_url":"https://api.github.com/users/dain/gists{/gist_id}","starred_url":"https://api.github.com/users/dain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dain/subscriptions","organizations_url":"https://api.github.com/users/dain/orgs","repos_url":"https://api.github.com/users/dain/repos","events_url":"https://api.github.com/users/dain/events{/privacy}","received_events_url":"https://api.github.com/users/dain/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-03-09T06:14:19Z","updated_at":"2015-03-09T07:47:57Z","closed_at":null,"body":"I have an ORC table employees_orc, and got error with query \r\nselect * from employees_orc where hire_date= date '1985-02-18'\r\n\r\nQuery 20150309_060956_00010_hxbst failed: Mismatched Domain types: class java.lang.Long vs class java.lang.Integer\r\ncom.facebook.presto.spi.PrestoException: Mismatched Domain types: class java.lang.Long vs class java.lang.Integer\r\n\tat com.facebook.presto.hive.orc.OrcPageSource.getNextPage(OrcPageSource.java:275)\r\n\tat com.facebook.presto.operator.ScanFilterAndProjectOperator.getOutput(ScanFilterAndProjectOperator.java:196)\r\n\tat com.facebook.presto.operator.Driver.processInternal(Driver.java:343)\r\n\tat com.facebook.presto.operator.Driver.processFor(Driver.java:283)\r\n\tat com.facebook.presto.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:563)\r\n\tat com.facebook.presto.execution.TaskExecutor$PrioritizedSplitRunner.process(TaskExecutor.java:449)\r\n\tat com.facebook.presto.execution.TaskExecutor$Runner.run(TaskExecutor.java:583)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: java.lang.IllegalArgumentException: Mismatched Domain types: class java.lang.Long vs class java.lang.Integer\r\n\tat com.facebook.presto.spi.Domain.checkTypeCompatibility(Domain.java:226)\r\n\tat com.facebook.presto.spi.Domain.intersect(Domain.java:180)\r\n\tat com.facebook.presto.spi.TupleDomain.intersect(TupleDomain.java:256)\r\n\tat com.facebook.presto.spi.TupleDomain.overlaps(TupleDomain.java:355)\r\n\tat com.facebook.presto.orc.TupleDomainOrcPredicate.matches(TupleDomainOrcPredicate.java:71)\r\n\tat com.facebook.presto.orc.StripeReader.selectRowGroups(StripeReader.java:281)\r\n\tat com.facebook.presto.orc.StripeReader.readStripe(StripeReader.java:119)\r\n\tat com.facebook.presto.orc.OrcRecordReader.advanceToNextStripe(OrcRecordReader.java:252)\r\n\tat com.facebook.presto.orc.OrcRecordReader.advanceToNextRowGroup(OrcRecordReader.java:221)\r\n\tat com.facebook.presto.orc.OrcRecordReader.nextBatch(OrcRecordReader.java:192)\r\n\tat com.facebook.presto.hive.orc.OrcPageSource.getNextPage(OrcPageSource.java:231)\r\n\t... 9 more\r\n\r\n@dain can you take a look at this, I think this is a bug."},"comment":{"url":"https://api.github.com/repos/facebook/presto/issues/comments/77811896","html_url":"https://github.com/facebook/presto/issues/2477#issuecomment-77811896","issue_url":"https://api.github.com/repos/facebook/presto/issues/2477","id":77811896,"user":{"login":"dain","id":58298,"avatar_url":"https://avatars.githubusercontent.com/u/58298?v=3","gravatar_id":"","url":"https://api.github.com/users/dain","html_url":"https://github.com/dain","followers_url":"https://api.github.com/users/dain/followers","following_url":"https://api.github.com/users/dain/following{/other_user}","gists_url":"https://api.github.com/users/dain/gists{/gist_id}","starred_url":"https://api.github.com/users/dain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dain/subscriptions","organizations_url":"https://api.github.com/users/dain/orgs","repos_url":"https://api.github.com/users/dain/repos","events_url":"https://api.github.com/users/dain/events{/privacy}","received_events_url":"https://api.github.com/users/dain/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T07:47:57Z","updated_at":"2015-03-09T07:47:57Z","body":"Can you try debugging to see what values are getting set into the tuple domains?"}}