You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/09/06 13:22:48 UTC

[GitHub] [incubator-doris] qidaye opened a new issue #6578: [Feature] Support fixedPointType value in like predicate

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


   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Description
   
   In MySQL, it supports Integer-Types in like predicates.
   
   But Doris dose not support this feature, it will throw an exception where interge is in like predicate.
   
   ```sql
   -- MySQL 
   mysql> desc t2;
   +-------+--------------+------+-----+---------+-------+
   | Field | Type         | Null | Key | Default | Extra |
   +-------+--------------+------+-----+---------+-------+
   | k1    | tinyint(4)   | YES  |     | NULL    |       |
   | k2    | smallint(6)  | YES  |     | NULL    |       |
   | k3    | mediumint(9) | YES  |     | NULL    |       |
   | k4    | int(11)      | YES  |     | NULL    |       |
   | k5    | bigint(20)   | YES  |     | NULL    |       |
   +-------+--------------+------+-----+---------+-------+
   5 rows in set (0.00 sec)
   
   mysql>
   mysql>
   mysql> select * from t2 where k1 like '1%' and k2 like '1%' and k3 like '1%' and k4 like '1%' and k5 like '1%';
   +------+------+------+------+------+
   | k1   | k2   | k3   | k4   | k5   |
   +------+------+------+------+------+
   |  123 |  123 |  123 |  123 |  123 |
   +------+------+------+------+------+
   1 row in set (0.00 sec)
   
   -- Doris 
   
   mysql> select * from t1 where id like '1%';
   ERROR 1064 (HY000): errCode = 2, detailMessage = left operand of LIKE must be of type STRING: `id` LIKE '1%'
   ```
   
   ### Use case
   
   In order to keep the behavior of Doris and mysql consistent. 
   
   I'll add support for integer types in like predicate of Doris.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman closed issue #6578: [Feature] Support fixedPointType value in like predicate

Posted by GitBox <gi...@apache.org>.
morningman closed issue #6578:
URL: https://github.com/apache/incubator-doris/issues/6578


   


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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org