Skip to content

Added support for IsNotNull & IsNull filters #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 17, 2017

Conversation

AleksandrPavlenko
Copy link
Contributor

@AleksandrPavlenko AleksandrPavlenko commented Jan 10, 2017

Added support for IsNotNull & isNull spark sql filters. It breaks compatibility with Riak TS versions older than 1.5.

}

protected def whereClause(filters: Array[Filter]): (String, Seq[Any]) = {
val sqlValue = filters.map(filterToSqlAndValue)
val sql = sqlValue.map(_._1).mkString(" AND ")
val args = sqlValue.map(_._2)
val args = sqlValue.flatMap(_._2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a comment that explains why we are using flatMap

@AleksandrPavlenko AleksandrPavlenko force-pushed the fix-null-constrains branch 5 times, most recently from 02323e2 to 7943cf8 Compare January 12, 2017 13:32
@srgg srgg merged commit fc8cd61 into spark-2.0-support Jan 17, 2017
@srgg srgg deleted the fix-null-constrains branch January 17, 2017 09:36
@srgg srgg mentioned this pull request Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants