{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/12777","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/12777/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/12777/comments","events_url":"https://api.github.com/repos/apache/spark/issues/12777/events","html_url":"https://github.com/apache/spark/pull/12777","id":151848831,"number":12777,"title":"[SPARK-14962][SQL] Do not push down isnotnull/isnull on unsuportted types in ORC","user":{"login":"HyukjinKwon","id":6477701,"avatar_url":"https://avatars.githubusercontent.com/u/6477701?v=3","gravatar_id":"","url":"https://api.github.com/users/HyukjinKwon","html_url":"https://github.com/HyukjinKwon","followers_url":"https://api.github.com/users/HyukjinKwon/followers","following_url":"https://api.github.com/users/HyukjinKwon/following{/other_user}","gists_url":"https://api.github.com/users/HyukjinKwon/gists{/gist_id}","starred_url":"https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyukjinKwon/subscriptions","organizations_url":"https://api.github.com/users/HyukjinKwon/orgs","repos_url":"https://api.github.com/users/HyukjinKwon/repos","events_url":"https://api.github.com/users/HyukjinKwon/events{/privacy}","received_events_url":"https://api.github.com/users/HyukjinKwon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-04-29T11:50:13Z","updated_at":"2016-04-29T12:45:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/12777","html_url":"https://github.com/apache/spark/pull/12777","diff_url":"https://github.com/apache/spark/pull/12777.diff","patch_url":"https://github.com/apache/spark/pull/12777.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nhttps://issues.apache.org/jira/browse/SPARK-14962\r\n\r\nORC filters were being pushed down for all types for both `IsNull` and `IsNotNull`.\r\n\r\nThis is apparently OK because both `IsNull` and `IsNotNull` do not take a type as an argument (Hive 1.2.x) during building filters (`SearchArgument`) in Spark-side but they do not filter correctly because stored statistics always produces `null` for not supported types (eg `ArrayType`) in ORC-side. So, it is always `true` for `IsNull` which ends up always `false` for `IsNotNull`.\r\n\r\nThis looks prevented in Hive 1.3.x >= by forcing to give a type when building a filter (`SearchArgument`) but Hive 1.2.x seems not doing this. \r\n\r\nThis PR prevents ORC filter creation for `IsNull` and `IsNotNull` on unsupported types. `OrcFilters` resembles `ParquetFilters`.\r\n\r\n## How was this patch tested?\r\n\r\nUnittests in `OrcQuerySuite` and `OrcFilterSuite` and `sbt scalastyle`.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/215701364","html_url":"https://github.com/apache/spark/pull/12777#issuecomment-215701364","issue_url":"https://api.github.com/repos/apache/spark/issues/12777","id":215701364,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T12:45:30Z","updated_at":"2016-04-29T12:45:30Z","body":"Test FAILed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57329/\nTest FAILed."}}