{"action":"closed","issue":{"url":"https://api.github.com/repos/MyCATApache/Mycat-Server/issues/160","labels_url":"https://api.github.com/repos/MyCATApache/Mycat-Server/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/MyCATApache/Mycat-Server/issues/160/comments","events_url":"https://api.github.com/repos/MyCATApache/Mycat-Server/issues/160/events","html_url":"https://github.com/MyCATApache/Mycat-Server/issues/160","id":59595234,"number":160,"title":"1.3.0.2版本查询时报com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr cannot be cast to com.alibaba.druid.sql.ast.expr.SQLPropertyExpr","user":{"login":"kevingzhz","id":1333127,"avatar_url":"https://avatars.githubusercontent.com/u/1333127?v=3","gravatar_id":"","url":"https://api.github.com/users/kevingzhz","html_url":"https://github.com/kevingzhz","followers_url":"https://api.github.com/users/kevingzhz/followers","following_url":"https://api.github.com/users/kevingzhz/following{/other_user}","gists_url":"https://api.github.com/users/kevingzhz/gists{/gist_id}","starred_url":"https://api.github.com/users/kevingzhz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevingzhz/subscriptions","organizations_url":"https://api.github.com/users/kevingzhz/orgs","repos_url":"https://api.github.com/users/kevingzhz/repos","events_url":"https://api.github.com/users/kevingzhz/events{/privacy}","received_events_url":"https://api.github.com/users/kevingzhz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-03T04:55:32Z","updated_at":"2015-06-12T12:32:02Z","closed_at":"2015-06-12T12:32:02Z","body":"表：\r\nCREATE TABLE `app_log` (\r\n  `car_id` int(11) NOT NULL DEFAULT '0',\r\n  `din` varchar(20) DEFAULT NULL,\r\n  `car_time` datetime DEFAULT '2015-01-01 00:00:00',\r\n  `receive_time` int(11) DEFAULT NULL,\r\n  PRIMARY KEY (`car_id`,`car_time`)\r\n) ENGINE=InnoDB DEFAULT CHARSET= utf8mb4\r\nPARTITION BY LIST (TO_DAYS(car_time)) (  \r\n    PARTITION p20150226 VALUES  IN (TO_DAYS('2015-02-26')),  \r\n    PARTITION p20150227 VALUES  IN (TO_DAYS('2015-02-27')),  \r\n    PARTITION p20150228 VALUES  IN (TO_DAYS('2015-02-28')),  \r\n\tPARTITION p20150301 VALUES  IN (TO_DAYS('2015-03-01')), \r\n\tPARTITION p20150302 VALUES  IN (TO_DAYS('2015-03-02')), \r\n\tPARTITION p20150303 VALUES  IN (TO_DAYS('2015-03-03')), \r\n\tPARTITION p20150304 VALUES  IN (TO_DAYS('2015-03-04')), \r\n\tPARTITION p20150305 VALUES  IN (TO_DAYS('2015-03-05')), \r\n\tPARTITION p20150306 VALUES  IN (TO_DAYS('2015-03-06')), \r\n\tPARTITION p20150307 VALUES  IN (TO_DAYS('2015-03-07')), \r\n\tPARTITION p20150308 VALUES  IN (TO_DAYS('2015-03-08')), \r\n\tPARTITION p20150309 VALUES  IN (TO_DAYS('2015-03-09')), \r\n\tPARTITION p20150310 VALUES  IN (TO_DAYS('2015-03-10')), \r\n\tPARTITION p20150311 VALUES  IN (TO_DAYS('2015-03-11')), \r\n\tPARTITION p20150312 VALUES  IN (TO_DAYS('2015-03-12')), \r\n\tPARTITION p20150313 VALUES  IN (TO_DAYS('2015-03-13')), \r\n\tPARTITION p20150314 VALUES  IN (TO_DAYS('2015-03-14')),\r\n\tPARTITION p20150315 VALUES  IN (TO_DAYS('2015-03-15'))  \t\r\n);\r\n\r\nmycat分片：org.opencloudb.route.function.PartitionByLong\r\n\r\n查询sql:select car_id,car_time from app_log  where  car_time between '2015-03-03 00:00:00' and '2015-03-03 23:59:59' and car_id=879 order by car_time desc\r\n\r\n报错：com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr cannot be cast to com.alibaba.druid.sql.ast.expr.SQLPropertyExpr\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:526)\r\n\tat com.mysql.jdbc.Util.handleNewInstance(Util.java:411)\r\n\tat com.mysql.jdbc.Util.getInstance(Util.java:386)\r\n\tat com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)\r\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4190)\r\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4122)\r\n\tat com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)\r\n\tat com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)\r\n\tat com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2812)\r\n\tat com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2761)\r\n\tat com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1612)"}}