You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:34:35 UTC

[jira] [Resolved] (SPARK-10837) TimeStamp could not work on sparksql very well

     [ https://issues.apache.org/jira/browse/SPARK-10837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-10837.
----------------------------------
    Resolution: Incomplete

> TimeStamp could not work on sparksql very well
> ----------------------------------------------
>
>                 Key: SPARK-10837
>                 URL: https://issues.apache.org/jira/browse/SPARK-10837
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.0
>            Reporter: Yun Zhao
>            Priority: Major
>              Labels: bulk-closed
>
> create a file as follows:
> {quote}
> 2015-09-02 09:06:00.000
> 2015-09-02 09:06:00.001
> 2015-09-02 09:06:00.100
> 2015-09-02 09:06:01.000
> {quote}
> Then upload it to hdfs, for example,put it to /test/testTable.
> create table:
> {quote}
> CREATE EXTERNAL TABLE `testTable`(`createtime` timestamp) LOCATION '/test/testTable';
> {quote}
> process sqls:
> {quote}
> select * from testTable where createtime = "2015-09-02 09:06:00.000";
> select * from testTable where createtime > "2015-09-02 09:06:00.000";
> select * from testTable where createtime >= "2015-09-02 09:06:00.000";
> {quote}
> The set of ">=" is not union set of "=" and ">".
> but if process sqls as follows:
> {quote}
> select * from testTable where createtime = timestamp("2015-09-02 09:06:00.000");
> select * from testTable where createtime > timestamp("2015-09-02 09:06:00.000");
> select * from testTable where createtime >= timestamp("2015-09-02 09:06:00.000");
> {quote}
> There's no such former problem. 
> User *explain extended* to find the difference of sqls:
> When uses "=","2015-09-02 09:06:00.000" is transfered to timestamp.
> When uses ">" or ">=",createtime is transfered to String.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org