You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "ulysses-you (via GitHub)" <gi...@apache.org> on 2024/05/15 03:38:52 UTC

[PR] [CORE] Add decimal precision tests [incubator-gluten]

ulysses-you opened a new pull request, #5752:
URL: https://github.com/apache/incubator-gluten/pull/5752

   ## What changes were proposed in this pull request?
   
   - Port `DecimalPrecisionSuite` into gluten.
   - Add dataType in `ExpressionTransformer` to help check data type
   
   ## How was this patch tested?
   
   Pass CI
   


-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

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

   Run Gluten Clickhouse CI


-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

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

   Run Gluten Clickhouse CI


-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

Posted by "ulysses-you (via GitHub)" <gi...@apache.org>.
ulysses-you commented on code in PR #5752:
URL: https://github.com/apache/incubator-gluten/pull/5752#discussion_r1604240574


##########
gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionTransformer.scala:
##########
@@ -18,6 +18,15 @@ package org.apache.gluten.expression
 
 import org.apache.gluten.substrait.expression.ExpressionNode
 
+import org.apache.spark.sql.catalyst.expressions.Expression
+import org.apache.spark.sql.types.DataType
+
 trait ExpressionTransformer {

Review Comment:
   yea, there are a lot of exprs else.. `ChildTransformer`, `NamedLambdaVariableTransformer`,  and some of those seem do not have origin, e.g., `UDFExpression`. If you prefer make all ExpressionTransformer hold origin, I can make the change in a new pr since it may need many code changes.



-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn merged PR #5752:
URL: https://github.com/apache/incubator-gluten/pull/5752


-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

Posted by "ulysses-you (via GitHub)" <gi...@apache.org>.
ulysses-you commented on PR #5752:
URL: https://github.com/apache/incubator-gluten/pull/5752#issuecomment-2113972798

   cc @jinchengchenghh @baibaichen @PHILO-HE  thank you


-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #5752:
URL: https://github.com/apache/incubator-gluten/pull/5752#discussion_r1602573722


##########
gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionTransformer.scala:
##########
@@ -18,6 +18,15 @@ package org.apache.gluten.expression
 
 import org.apache.gluten.substrait.expression.ExpressionNode
 
+import org.apache.spark.sql.catalyst.expressions.Expression
+import org.apache.spark.sql.types.DataType
+
 trait ExpressionTransformer {

Review Comment:
   Does this one still should be used? Can we use `ExpressionTransformerWithOrigin` to replace `ExpressionTransformer` and rename `ExpressionTransformerWithOrigin` to `ExpressionTransformer`?



-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

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

   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICEGJ-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   
   Thanks for opening a pull request!
   
   Could you open an issue for this pull request on Github Issues?
   
   https://github.com/apache/incubator-gluten/issues
   
   Then could you also rename ***commit message*** and ***pull request title*** in the following format?
   
       [GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/incubator-gluten/pulls/)
   
   


-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #5752:
URL: https://github.com/apache/incubator-gluten/pull/5752#discussion_r1604244527


##########
gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionTransformer.scala:
##########
@@ -18,6 +18,15 @@ package org.apache.gluten.expression
 
 import org.apache.gluten.substrait.expression.ExpressionNode
 
+import org.apache.spark.sql.catalyst.expressions.Expression
+import org.apache.spark.sql.types.DataType
+
 trait ExpressionTransformer {

Review Comment:
   For the code clean, I prefer to hold origin for all the `ExpressionTransformer`, what do you think? @zhztheplayer 



-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #5752:
URL: https://github.com/apache/incubator-gluten/pull/5752#discussion_r1604244527


##########
gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionTransformer.scala:
##########
@@ -18,6 +18,15 @@ package org.apache.gluten.expression
 
 import org.apache.gluten.substrait.expression.ExpressionNode
 
+import org.apache.spark.sql.catalyst.expressions.Expression
+import org.apache.spark.sql.types.DataType
+
 trait ExpressionTransformer {

Review Comment:
   For the code clean, I prefer to hold origin for all the `ExpressionTransformer`, what do you think? @zhztheplayer 
   Free to do it in a separate PR. 



-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

Posted by "ulysses-you (via GitHub)" <gi...@apache.org>.
ulysses-you commented on code in PR #5752:
URL: https://github.com/apache/incubator-gluten/pull/5752#discussion_r1601172081


##########
gluten-core/src/main/scala/org/apache/gluten/backendsapi/SparkPlanExecApi.scala:
##########
@@ -450,14 +450,6 @@ trait SparkPlanExecApi {
     GenericExpressionTransformer(substraitExprName, children, original)
   }
 
-  def genEqualNullSafeTransformer(
-      substraitExprName: String,
-      left: ExpressionTransformer,
-      right: ExpressionTransformer,
-      original: EqualNullSafe): ExpressionTransformer = {
-    GenericExpressionTransformer(substraitExprName, Seq(left, right), original)

Review Comment:
   no backends override this, remove it and use GenericExpressionTransformer



-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

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

   Run Gluten Clickhouse CI


-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

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

   Run Gluten Clickhouse CI


-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

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

   Run Gluten Clickhouse CI


-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

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

   Run Gluten Clickhouse CI


-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

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

   Run Gluten Clickhouse CI


-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

Posted by "jinchengchenghh (via GitHub)" <gi...@apache.org>.
jinchengchenghh commented on code in PR #5752:
URL: https://github.com/apache/incubator-gluten/pull/5752#discussion_r1604232341


##########
gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionTransformer.scala:
##########
@@ -18,6 +18,15 @@ package org.apache.gluten.expression
 
 import org.apache.gluten.substrait.expression.ExpressionNode
 
+import org.apache.spark.sql.catalyst.expressions.Expression
+import org.apache.spark.sql.types.DataType
+
 trait ExpressionTransformer {

Review Comment:
   We can change it to catch original, do you have other example?
   ```
   val b = bindReference.asInstanceOf[BoundReference]
             AttributeReferenceTransformer(
               a.name,
               b.ordinal,
               a.dataType,
               b.nullable,
               a.exprId,
               a.qualifier,
               a.metadata)
   
         case b: BoundReference =>
           BoundReferenceTransformer(b.ordinal, b.dataType, b.nullable)
   ```



-- 
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@gluten.apache.org

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


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


Re: [PR] [CORE] Add decimal precision tests [incubator-gluten]

Posted by "ulysses-you (via GitHub)" <gi...@apache.org>.
ulysses-you commented on code in PR #5752:
URL: https://github.com/apache/incubator-gluten/pull/5752#discussion_r1602624507


##########
gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionTransformer.scala:
##########
@@ -18,6 +18,15 @@ package org.apache.gluten.expression
 
 import org.apache.gluten.substrait.expression.ExpressionNode
 
+import org.apache.spark.sql.catalyst.expressions.Expression
+import org.apache.spark.sql.types.DataType
+
 trait ExpressionTransformer {

Review Comment:
   Some expression transformer did not catch orginal expression. e.g., `BoundReferenceTransformer`, `AttributeReferenceTransformer`, etc. So I leave it in this pr.



-- 
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@gluten.apache.org

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


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