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 2023/01/10 05:32:14 UTC

[GitHub] [doris] ByteYue opened a new pull request, #15762: [Bug](predicate) add double predicate creator

ByteYue opened a new pull request, #15762:
URL: https://github.com/apache/doris/pull/15762

   # Proposed changes
   
   Issue Number: close #15761 
   Add one double predicator the same as integer predicate creator.
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [x] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [x] Yes
       - [ ] No
       - [ ] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [x] No
       - [ ] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [x] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [x] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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] [doris] github-actions[bot] commented on pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15762:
URL: https://github.com/apache/doris/pull/15762#issuecomment-1378890873

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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] [doris] github-actions[bot] commented on pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15762:
URL: https://github.com/apache/doris/pull/15762#issuecomment-1376764821

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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] [doris] ByteYue commented on a diff in pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
ByteYue commented on code in PR #15762:
URL: https://github.com/apache/doris/pull/15762#discussion_r1067150560


##########
be/src/olap/predicate_creator.h:
##########
@@ -64,7 +64,14 @@ class IntegerPredicateCreator : public PredicateCreator<ConditionType> {
 private:
     static CppType convert(const std::string& condition) {
         CppType value = 0;
-        std::from_chars(condition.data(), condition.data() + condition.size(), value);
+        // because std::from_chars can't compile on macOS
+        if constexpr (std::is_same_v<CppType, double>) {
+            value = std::stod(condition, nullptr);
+        } else if constexpr (std::is_same_v<CppType, float>) {
+            value = std::stof(condition, nullptr);

Review Comment:
   It's curious that std::from_char can't not pass the compilation on MacOS so i have to use specialization for double and float 



-- 
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] [doris] ByteYue commented on a diff in pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
ByteYue commented on code in PR #15762:
URL: https://github.com/apache/doris/pull/15762#discussion_r1065387585


##########
be/src/olap/predicate_creator.h:
##########
@@ -163,6 +166,9 @@ inline std::unique_ptr<PredicateCreator<ConditionType>> get_creator(const FieldT
     case OLAP_FIELD_TYPE_LARGEINT: {
         return std::make_unique<IntegerPredicateCreator<TYPE_LARGEINT, PT, ConditionType>>();
     }
+    case OLAP_FIELD_TYPE_DOUBLE: {

Review Comment:
   > 
   
   > Better remove DoulbePredicatrCreator and use IntegerPredicateCreator directly on `DOUBLE`. 
   
   OK. Already changed.
   >btw `DoulbePredicatrCreator` seems have a typo. XD
   
   😂Oh... My bad. I didn't notice it.
   
   



-- 
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] [doris] BiteTheDDDDt commented on a diff in pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #15762:
URL: https://github.com/apache/doris/pull/15762#discussion_r1065356079


##########
be/src/olap/predicate_creator.h:
##########
@@ -163,6 +166,9 @@ inline std::unique_ptr<PredicateCreator<ConditionType>> get_creator(const FieldT
     case OLAP_FIELD_TYPE_LARGEINT: {
         return std::make_unique<IntegerPredicateCreator<TYPE_LARGEINT, PT, ConditionType>>();
     }
+    case OLAP_FIELD_TYPE_DOUBLE: {

Review Comment:
   > 
   
   Better remove DoulbePredicatrCreator and use IntegerPredicateCreator directly on `DOUBLE`.
   btw `DoulbePredicatrCreator` seems have a typo. XD



-- 
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] [doris] github-actions[bot] commented on pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15762:
URL: https://github.com/apache/doris/pull/15762#issuecomment-1376758610

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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] [doris] github-actions[bot] commented on pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15762:
URL: https://github.com/apache/doris/pull/15762#issuecomment-1379786242

   PR approved by anyone and no changes requested.


-- 
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] [doris] yiguolei merged pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
yiguolei merged PR #15762:
URL: https://github.com/apache/doris/pull/15762


-- 
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] [doris] hello-stephen commented on pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #15762:
URL: https://github.com/apache/doris/pull/15762#issuecomment-1376887573

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 35.17 seconds
    load time: 483 seconds
    storage size: 17122809006 Bytes
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230110082007_clickbench_pr_76644.html


-- 
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] [doris] github-actions[bot] commented on pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15762:
URL: https://github.com/apache/doris/pull/15762#issuecomment-1379786207

   PR approved by at least one committer and no changes requested.


-- 
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] [doris] ByteYue commented on a diff in pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
ByteYue commented on code in PR #15762:
URL: https://github.com/apache/doris/pull/15762#discussion_r1065353532


##########
be/src/olap/predicate_creator.h:
##########
@@ -163,6 +166,9 @@ inline std::unique_ptr<PredicateCreator<ConditionType>> get_creator(const FieldT
     case OLAP_FIELD_TYPE_LARGEINT: {
         return std::make_unique<IntegerPredicateCreator<TYPE_LARGEINT, PT, ConditionType>>();
     }
+    case OLAP_FIELD_TYPE_DOUBLE: {

Review Comment:
   > Maybe need add FLOAT also
   
   😂My bad, I added both float and double in another machine but only added double in the machine where i created this pr.
   Already added.



-- 
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] [doris] BiteTheDDDDt commented on a diff in pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #15762:
URL: https://github.com/apache/doris/pull/15762#discussion_r1065351595


##########
be/src/olap/predicate_creator.h:
##########
@@ -163,6 +166,9 @@ inline std::unique_ptr<PredicateCreator<ConditionType>> get_creator(const FieldT
     case OLAP_FIELD_TYPE_LARGEINT: {
         return std::make_unique<IntegerPredicateCreator<TYPE_LARGEINT, PT, ConditionType>>();
     }
+    case OLAP_FIELD_TYPE_DOUBLE: {

Review Comment:
   Maybe need add FLOAT also



-- 
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] [doris] github-actions[bot] commented on pull request #15762: [Bug](predicate) add double predicate creator

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15762:
URL: https://github.com/apache/doris/pull/15762#issuecomment-1376807454

   clang-tidy review says "All clean, LGTM! :+1:"


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