GitHub user culler opened a pull request:
https://github.com/apache/spark/pull/3158
[SPARK-4205][SQL] Timestamp and Date with comparisons / DSL literals
This is the same as pull request #3066, which I closed due to corruption of
the repository after I tried to rebase so as to include modifications to a test
file added after the original pull request was issued.
There are two parts:
(1) new RichDate and RichTimestamp classes provide comparison operators,
which allows them to be used in DSL expressions, and initializers which accept
string representations of dates or times;
(2) new implicit conversions are added which allow recognition of DSL
expressions which have a literal on the left, e.g. 0 < 'x .
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/culler/spark master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/3158.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3158
----
commit 7180345ba7ce255a2fc389ae8c55998ed20b9a82
Author: Marc Culler <[email protected]>
Date: 2014-11-07T16:11:09Z
Adds RichDate and RichTimestamp classes with comparison operators,
allowing them to be used in DSL expressions. These classes provide
initializers which accept string representations of dates or times.
They are renamed as Date and Timestamp when the members of an
SQLContext are in scope.
commit bcf6e6bb143f8e4a5f22356fadae54fce4f57041
Author: Marc Culler <[email protected]>
Date: 2014-11-07T16:17:33Z
Adds new implicit conversions which allow DSL expressions to start
with a literal, e.g. 0 < 'x .
These conversions expose a conflict with the scalatest === operator
if assert(X === Y) is used when the conversions are in scope. To
fix this, several tests are modified, as recommended in the scalatest
documentation, by making the change:
assert(X === Y) --> assert(convertToEqualizer(X).===(Y))
commit ef5e4a4230d671ed2ae19f74c280f5e8c44f41aa
Author: Marc Culler <[email protected]>
Date: 2014-11-07T16:38:18Z
Clarification of one comment.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]