You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "ucasfl (via GitHub)" <gi...@apache.org> on 2023/08/10 02:49:33 UTC

[GitHub] [doris] ucasfl opened a new pull request, #22801: Use clear concept to replace std::enable_if

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

   ## Proposed changes
   
   Issue Number: close #xxx
   
   <!--Describe your changes.-->
   
   ## 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 #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22801:
URL: https://github.com/apache/doris/pull/22801#issuecomment-1675651113

   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 #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22801:
URL: https://github.com/apache/doris/pull/22801#issuecomment-1675517124

   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] ucasfl commented on a diff in pull request #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "ucasfl (via GitHub)" <gi...@apache.org>.
ucasfl commented on code in PR #22801:
URL: https://github.com/apache/doris/pull/22801#discussion_r1292021476


##########
be/src/vec/core/decimal_comparison.h:
##########
@@ -135,8 +135,8 @@ class DecimalComparison {
     }
 
     template <typename T, typename U>
-    static std::enable_if_t<IsDecimalNumber<T> && IsDecimalNumber<U>, Shift> getScales(
-            const DataTypePtr& left_type, const DataTypePtr& right_type) {
+        requires IsDecimalNumber<T> && IsDecimalNumber<U>

Review Comment:
   Unneed, just need `()` when having `!`



-- 
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] ucasfl commented on pull request #22801: Use clear concept to replace std::enable_if

Posted by "ucasfl (via GitHub)" <gi...@apache.org>.
ucasfl commented on PR #22801:
URL: https://github.com/apache/doris/pull/22801#issuecomment-1672472631

   run buildall


-- 
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 #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22801:
URL: https://github.com/apache/doris/pull/22801#issuecomment-1675517100

   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] ucasfl commented on pull request #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "ucasfl (via GitHub)" <gi...@apache.org>.
ucasfl commented on PR #22801:
URL: https://github.com/apache/doris/pull/22801#issuecomment-1675692895

   run buildall


-- 
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 commented on a diff in pull request #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on code in PR #22801:
URL: https://github.com/apache/doris/pull/22801#discussion_r1292008022


##########
be/src/vec/data_types/data_type_decimal.h:
##########
@@ -407,10 +407,10 @@ constexpr bool IsDataTypeDecimalOrNumber =
         IsDataTypeDecimal<DataType> || IsDataTypeNumber<DataType>;
 
 template <typename FromDataType, typename ToDataType>
-std::enable_if_t<IsDataTypeDecimal<FromDataType> && IsDataTypeDecimal<ToDataType>,
-                 typename ToDataType::FieldType>
-convert_decimals(const typename FromDataType::FieldType& value, UInt32 scale_from, UInt32 scale_to,
-                 UInt8* overflow_flag = nullptr) {
+    requires IsDataTypeDecimal<FromDataType> && IsDataTypeDecimal<ToDataType>

Review Comment:
   requires () ?



##########
be/src/vec/data_types/data_type_decimal.h:
##########
@@ -534,9 +534,9 @@ void convert_decimal_cols(
 }
 
 template <typename FromDataType, typename ToDataType>
-std::enable_if_t<IsDataTypeDecimal<FromDataType> && IsDataTypeNumber<ToDataType>,
-                 typename ToDataType::FieldType>
-convert_from_decimal(const typename FromDataType::FieldType& value, UInt32 scale) {
+    requires IsDataTypeDecimal<FromDataType> && IsDataTypeNumber<ToDataType>

Review Comment:
   requires ()?



-- 
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 commented on a diff in pull request #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on code in PR #22801:
URL: https://github.com/apache/doris/pull/22801#discussion_r1292007994


##########
be/src/vec/core/decimal_comparison.h:
##########
@@ -135,8 +135,8 @@ class DecimalComparison {
     }
 
     template <typename T, typename U>
-    static std::enable_if_t<IsDecimalNumber<T> && IsDecimalNumber<U>, Shift> getScales(
-            const DataTypePtr& left_type, const DataTypePtr& right_type) {
+        requires IsDecimalNumber<T> && IsDecimalNumber<U>

Review Comment:
   requires (IsDecimalNumber<T> && IsDecimalNumber<U>) ?



-- 
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 #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22801:
URL: https://github.com/apache/doris/pull/22801#issuecomment-1672477021

   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] hello-stephen commented on pull request #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #22801:
URL: https://github.com/apache/doris/pull/22801#issuecomment-1672517727

   (From new machine)TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 45.08 seconds
    stream load tsv:          515 seconds loaded 74807831229 Bytes, about 138 MB/s
    stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
    stream load orc:          65 seconds loaded 1101869774 Bytes, about 16 MB/s
    stream load parquet:          30 seconds loaded 861443392 Bytes, about 27 MB/s
    insert into select:          29.3 seconds inserted 10000000 Rows, about 341K ops/s
    storage size: 17162091070 Bytes


-- 
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 #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #22801:
URL: https://github.com/apache/doris/pull/22801#issuecomment-1675724737

   (From new machine)TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 46.16 seconds
    stream load tsv:          514 seconds loaded 74807831229 Bytes, about 138 MB/s
    stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
    stream load orc:          64 seconds loaded 1101869774 Bytes, about 16 MB/s
    stream load parquet:          31 seconds loaded 861443392 Bytes, about 26 MB/s
    insert into select:          29.2 seconds inserted 10000000 Rows, about 342K ops/s
    storage size: 17162285562 Bytes


-- 
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 commented on a diff in pull request #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on code in PR #22801:
URL: https://github.com/apache/doris/pull/22801#discussion_r1292008035


##########
be/src/vec/data_types/data_type_decimal.h:
##########
@@ -578,10 +578,9 @@ convert_from_decimal(const typename FromDataType::FieldType& value, UInt32 scale
 }
 
 template <typename FromDataType, typename ToDataType>
-std::enable_if_t<IsDataTypeNumber<FromDataType> && IsDataTypeDecimal<ToDataType>,
-                 typename ToDataType::FieldType>
-convert_to_decimal(const typename FromDataType::FieldType& value, UInt32 scale,
-                   UInt8* overflow_flag) {
+    requires IsDataTypeNumber<FromDataType> && IsDataTypeDecimal<ToDataType>

Review Comment:
   requires ()?



-- 
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 #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #22801:
URL: https://github.com/apache/doris/pull/22801


-- 
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 #22801: [refactor]use clear concept to replace std::enable_if_t

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22801:
URL: https://github.com/apache/doris/pull/22801#issuecomment-1675741387

   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