Github user x1- commented on the pull request:

    https://github.com/apache/spark/pull/8339#issuecomment-133457237
  
    @sarutak 
    I tried *casting Timestamp to Long and Long to Timestamp* using Hive below.
    
    ```sql
    hive> SELECT CAST(CAST(1.2 AS TIMESTAMP) AS DOUBLE);
    OK
    1.2
    Time taken: 3.637 seconds, Fetched: 1 row(s)
    
    hive> SELECT CAST(CAST(1200 AS TIMESTAMP) AS INT);
    OK
    1
    ```
    
    This mean that Hive has contradiction in converting Timestamp to Int, and 
then Int to Timestamp.
    Because of spark has different dialect, it is better way closing this PR, I 
think.


---
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]

Reply via email to