Uh oh!
There was an error while loading. Please reload this page.
SPARK-16636 Add CalendarIntervalType to documentation - #16747
Conversation
AmplabJenkins
commented
Jan 30, 2017
Can one of the admins verify this patch? |
srowen
commented
Jan 31, 2017
@HyukjinKwon is this OK by you? |
I am OK but I remember there were some discussions about whether this type should be exposed or not and I could not track down the conclusion further, I remember I saw @rxin there IIRC. |
srowen
commented
Feb 6, 2017
CC @cloud-fan for #13008 (comment) and @yhuai for #8597 (comment) as they might be what you're referring to? |
Actually, mine was in the jira (the comment was something like... do we really want to support this as an external blabla..... IIRC.. sorry I can't find the jira..). It seems there are several ones here and there. Maybe #15751 (comment) is related too because it is about supporting reading/writing out that type where it might refer that we can explicitly give the schema with that type.cc @mambrus too. |
HyukjinKwon
commented
Feb 6, 2017
(FWIW, I am OK but just worried if it might be supposed to be internal type, maybe in the future) |
terma
commented
Feb 7, 2017
@srowen As I understood |
^ I want to be very sure if we are not going to expose this or not. Could any SQL committer guy or PMC confirm this?
This means a lot of things for example,
scala>importorg.apache.spark.sql.types.CalendarIntervalTypeimportorg.apache.spark.sql.types.CalendarIntervalType
and etc. |
cloud-fan
commented
Feb 7, 2017
Actually So I'm ok to add documents for it. |
Then, It looks okay to me as describing the current state and I just checked it after building the doc with this, and also we can already use it as below: scala> sql("SELECT interval 1 second").schema(0).dataType.getClass
res0:Class[_ <: org.apache.spark.sql.types.DataType] =classorg.apache.spark.sql.types.CalendarIntervalType$
scala> sql("SELECT interval 1 second").collect()(0).get(0).getClass
res1:Class[_] =classorg.apache.spark.unsafe.types.CalendarIntervalscala>valrdd= spark.sparkContext.parallelize(Seq(Row(newCalendarInterval(0, 0))))
rdd: org.apache.spark.rdd.RDD[org.apache.spark.sql.Row] =ParallelCollectionRDD[0] at parallelize at <console>:32
scala> spark.createDataFrame(rdd, StructType(StructField("a", CalendarIntervalType) ::Nil))
res1: org.apache.spark.sql.DataFrame= [a: calendarinterval]Another meta concern is, Maybe just describe it as SQL dedicated type or not supported for now with some |
cloud-fan
commented
Feb 7, 2017
CC @rxin, if we are going to expose |
gatorsmile
commented
Jun 13, 2017
@terma To avoid confusing the Spark SQL users, we might not document it? How about closing this PR now? Thanks! |
What changes were proposed in this pull request?
Add CalendarIntervalType to SQL Data Types in documentation
How was this patch tested?
unit tests
@marmbrus please review