[ 
https://issues.apache.org/jira/browse/PHOENIX-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15283880#comment-15283880
 ] 

Hudson commented on PHOENIX-2784:
---------------------------------

SUCCESS: Integrated in Phoenix-master #1224 (See 
[https://builds.apache.org/job/Phoenix-master/1224/])
PHOENIX-2784 phoenix-spark: Allow coercion of DATE to TIMESTAMP for (jmahonin: 
rev 98e783cf6d7b4644660f48961795699d5374ce3f)
* phoenix-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala
* phoenix-spark/src/main/scala/org/apache/phoenix/spark/DefaultSource.scala
* phoenix-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRelation.scala
* phoenix-spark/src/main/scala/org/apache/phoenix/spark/PhoenixRDD.scala


> phoenix-spark: Allow coercion of DATE fields to TIMESTAMP when loading 
> DataFrames
> ---------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2784
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2784
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 4.7.0
>            Reporter: Josh Mahonin
>            Assignee: Josh Mahonin
>            Priority: Minor
>             Fix For: 4.8.0
>
>         Attachments: PHOENIX-2784.patch
>
>
> The Phoenix DATE type is internally represented as an 8 bytes, which can 
> store a full 'yyyy-MM-dd hh:mm:ss' time component. However, Spark SQL follows 
> the SQL Date spec and keeps only the 'yyyy-MM-dd' portion as a 4 byte type. 
> When loading Phoenix DATE columns using the Spark DataFrame API, the 
> 'hh:mm:ss' component is lost.
> This patch allows setting a new 'dateAsTimestamp' option when loading a 
> DataFrame, which will coerce the underlying Date object to a Timestamp so 
> that the full time component is loaded.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to