{"action":"created","issue":{"url":"https://api.github.com/repos/datastax/spark-cassandra-connector/issues/671","labels_url":"https://api.github.com/repos/datastax/spark-cassandra-connector/issues/671/labels{/name}","comments_url":"https://api.github.com/repos/datastax/spark-cassandra-connector/issues/671/comments","events_url":"https://api.github.com/repos/datastax/spark-cassandra-connector/issues/671/events","html_url":"https://github.com/datastax/spark-cassandra-connector/pull/671","id":78085716,"number":671,"title":"SPARKC-166: Refactoring: Decouple PredicatePushDown from SparkSQL","user":{"login":"pkolaczk","id":1352795,"avatar_url":"https://avatars.githubusercontent.com/u/1352795?v=3","gravatar_id":"","url":"https://api.github.com/users/pkolaczk","html_url":"https://github.com/pkolaczk","followers_url":"https://api.github.com/users/pkolaczk/followers","following_url":"https://api.github.com/users/pkolaczk/following{/other_user}","gists_url":"https://api.github.com/users/pkolaczk/gists{/gist_id}","starred_url":"https://api.github.com/users/pkolaczk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkolaczk/subscriptions","organizations_url":"https://api.github.com/users/pkolaczk/orgs","repos_url":"https://api.github.com/users/pkolaczk/repos","events_url":"https://api.github.com/users/pkolaczk/events{/privacy}","received_events_url":"https://api.github.com/users/pkolaczk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-19T13:23:09Z","updated_at":"2015-05-20T13:07:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/datastax/spark-cassandra-connector/pulls/671","html_url":"https://github.com/datastax/spark-cassandra-connector/pull/671","diff_url":"https://github.com/datastax/spark-cassandra-connector/pull/671.diff","patch_url":"https://github.com/datastax/spark-cassandra-connector/pull/671.patch"},"body":"PredicatePushDown class was tied to Spark code by depending on Spark's\r\ninternal Expression class. This caused a problem when we wanted to\r\nunit-test it separately or when we wanted to support other\r\nrepresentation of predicates like the new Filter class introduced by\r\nSpark Data Sources API.\r\n\r\nTherefore in this ticket, PredicatePushDown class has been moved out\r\nfrom CassandraStrategies into its own file. Then all Spark-specific\r\ncode has been factored out to a separate PredicateOps typeclass.\r\nPredicatePushDown has been generified to take predicate class type\r\nparameter. This way, it can work with any type of predicate that is\r\nin PredicateOps. PredicateOps is available for Expression and Filter.\r\nIt is very easy to add support for other types of predicates in the\r\nfuture without changing PredicatePushDown code. Additionally, there\r\nis less risk Spark API changes ever break our unit-tests."},"comment":{"url":"https://api.github.com/repos/datastax/spark-cassandra-connector/issues/comments/103877711","html_url":"https://github.com/datastax/spark-cassandra-connector/pull/671#issuecomment-103877711","issue_url":"https://api.github.com/repos/datastax/spark-cassandra-connector/issues/671","id":103877711,"user":{"login":"pedjak","id":132690,"avatar_url":"https://avatars.githubusercontent.com/u/132690?v=3","gravatar_id":"","url":"https://api.github.com/users/pedjak","html_url":"https://github.com/pedjak","followers_url":"https://api.github.com/users/pedjak/followers","following_url":"https://api.github.com/users/pedjak/following{/other_user}","gists_url":"https://api.github.com/users/pedjak/gists{/gist_id}","starred_url":"https://api.github.com/users/pedjak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedjak/subscriptions","organizations_url":"https://api.github.com/users/pedjak/orgs","repos_url":"https://api.github.com/users/pedjak/repos","events_url":"https://api.github.com/users/pedjak/events{/privacy}","received_events_url":"https://api.github.com/users/pedjak/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T13:07:58Z","updated_at":"2015-05-20T13:07:58Z","body":"+1"}}