Yun Zhao created SPARK-10837: -------------------------------- Summary: 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
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 (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org