blackfox1983 opened a new issue #4761:
URL: https://github.com/apache/incubator-doris/issues/4761


   **Describe the bug**
   ```
   MySQL [dw]> select count(1) from dw.my_table where from_unixtime(trade_time, 
'%Y%m%d') = '20201005';
   +----------+
   | count(1) |
   +----------+
   |    19665 |
   +----------+
   1 row in set (4.36 sec)
   
   MySQL [dw]> select sub_trade_id from dw.my_table where 
from_unixtime(trade_time, '%Y%m%d') = '20201005';
   +--------------+
   | sub_trade_id |
   +--------------+
   |   1334976489 |
   ...
   |   1335063157 |
   +--------------+
   19665 rows in set (5.22 sec)
   
   MySQL [dw]> select trade_id from dw.my_table where from_unixtime(trade_time, 
'%Y%m%d') = '20201005' limit 1;
   Empty set (0.00 sec)
   
   MySQL [dw]> select sub_trade_id from dw.my_table where 
from_unixtime(trade_time, '%Y%m%d') = '20201005' limit 10;
   Empty set (0.00 sec)
   ```
   
   The URI address and DSL for Doris request is 
   ```
   192.168.1.120:10200/index_test/_doc/_
   
search?terminate_after=1&preference=_shards:3&filter_path=_scroll_id,hits.total,hits.hits._score,hits.hits.fields
   
   
{"query":{"match_all":{}},"stored_fields":"_none_","docvalue_fields":["sub_trade_id","trade_time"],"sort":["_doc"],"size":1}
   ```
   
   After testing with kibana, it is found that the data returned by DSL can not 
be obtained using from_unixtime function in where clause.
   ```
   {
     "hits" : {
       "total" : 1,
       "hits" : [
         {
           "_score" : null,
           "fields" : {
             "trade_time" : [
               1600321018
             ],
             "sub_trade_id" : [
               1308628530
             ]
           }
         }
       ]
     }
   }
   
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to