Uh oh!
There was an error while loading. Please reload this page.
[SPARK-24695] [SQL]: To add support to return Calendar interval from udf. - #21679
[SPARK-24695] [SQL]: To add support to return Calendar interval from udf.#21679priyankagargnitk wants to merge 11 commits into
Conversation
## What changes were proposed in this pull request? This change adds capability to return Calender interval from udf. Earlier, the udf of Type (String => CalendarInterval) was throwing Exception stating: Schema for type org.apache.spark.unsafe.types.CalendarInterval is not supported java.lang.UnsupportedOperationException: Schema for type org.apache.spark.unsafe.types.CalendarInterval is not supported at org.apache.spark.sql.catalyst.ScalaReflection391anonfun.apply(ScalaReflection.scala:781) ## How was this patch tested? Added test case in ScalaReflectionSuite.scala and ExpressionEncoderSuite.scala Also, tested by creating an udf that returns Calendar interval. jira entry for detail: https://issues.apache.org/jira/browse/SPARK-24695
maropu
commented
Jul 2, 2018
Since |
maropu
commented
Jul 2, 2018
btw, can you update the title like |
gatorsmile
left a comment
There was a problem hiding this comment.
In the short term, we do not plan to make CalendarInterval public.
org.apache.spark.unsafe.types.CalenderInterval is already public, am i missing something. |
maropu
commented
Jul 2, 2018
Actually, the unsafe package does not include user-facing classes. |
HyukjinKwon
commented
Jul 2, 2018
Yea, so it's kind of half public now but not completely exposed. It should be exposed before we extend its support. |
priyankagargnitk
commented
Jul 6, 2018
What if i make changes to expose it? |
HyukjinKwon
commented
Jul 21, 2018
I would better open a discussion thread in the mailing list before making a PR to expose it. Shell we leave this close this meanwhile? I think it's better to leave active and actionable PRs only. |
HyukjinKwon
commented
Nov 8, 2018
I think we should close this for now then. |
gatorsmile
commented
Nov 11, 2018
For your information, @cloud-fan and I are discussing how we expose calendar interval data types. Will post the proposal later. |
hvanhovell
commented
Jun 19, 2019
I think this one is reasonable. We already exposed it as an argument to a UDF, so it is pretty poor UX to not allow a return type. As for making CalendarInterval public, what is there to do besides moving it? Reopening this one. |
hvanhovell
commented
Jun 19, 2019
@priyankagargnitk can you update this one. |
AmplabJenkins
commented
Jun 19, 2019
Can one of the admins verify this patch? |
maropu
commented
Jun 30, 2019
@priyankagargnitk ping, are you still there? |
priyankagargnitk
commented
Jul 1, 2019
I am working on this, I'll update the PR in a day or two. |
priyankagargnitk
commented
Jul 1, 2019
A new PR has been raised. |
priyankagargnitk
commented
Jul 1, 2019
Closesapache#21766Closesapache#21679Closesapache#21161Closesapache#20846Closesapache#19434Closesapache#18080Closesapache#17648Closesapache#17169 Add: Closesapache#22813Closesapache#21994Closesapache#22005Closesapache#22463 Add: Closesapache#15899 Add: Closesapache#22539Closesapache#21868Closesapache#21514Closesapache#21402Closesapache#21322Closesapache#21257Closesapache#20163Closesapache#19691Closesapache#18697Closesapache#18636Closesapache#17176Closesapache#23001 from wangyum/CloseStalePRs. Authored-by: Yuming Wang <yumwang@ebay.com> Signed-off-by: hyukjinkwon <gurwls223@apache.org>
What changes were proposed in this pull request?
This change adds capability to return Calender interval from udf.
Earlier, the udf of Type (String => CalendarInterval) was throwing Exception stating:
Schema for type org.apache.spark.unsafe.types.CalendarInterval is not supported
java.lang.UnsupportedOperationException: Schema for type org.apache.spark.unsafe.types.CalendarInterval is not supported
at org.apache.spark.sql.catalyst.ScalaReflection391anonfun.apply(ScalaReflection.scala:781)
How was this patch tested?
Added test case in ScalaReflectionSuite.scala and ExpressionEncoderSuite.scala
Also, tested by creating an udf that returns Calendar interval.
jira entry for detail: https://issues.apache.org/jira/browse/SPARK-24695