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

[PR] [VL] Support regr_slope aggregate function [incubator-gluten]

liujiayi771 opened a new pull request, #5216:
URL: https://github.com/apache/incubator-gluten/pull/5216

   ## What changes were proposed in this pull request?
   
   Support regr_slope aggregate function.
   
   ## How was this patch tested?
   
   Add new test case in `VeloxAggregateFunctionsSuite`.
   
   


-- 
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] [VL] Support regr_slope aggregate function [incubator-gluten]

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


##########
backends-velox/src/main/scala/org/apache/gluten/execution/HashAggregateExecTransformer.scala:
##########
@@ -146,7 +146,7 @@ abstract class HashAggregateExecTransformer(
           val (sparkOrders, sparkTypes) =
             aggFunc.aggBufferAttributes.map(attr => (attr.name, attr.dataType)).unzip
           val veloxOrders = VeloxIntermediateData.veloxIntermediateDataOrder(aggFunc)
-          val adjustedOrders = sparkOrders.map(veloxOrders.indexOf(_))
+          val adjustedOrders = sparkOrders.map(VeloxIntermediateData.getAttrIndex(veloxOrders, _))

Review Comment:
   Is this change a bug fix?



-- 
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] [VL] Support regr_slope aggregate function [incubator-gluten]

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

   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] [VL] Support regr_slope aggregate function [incubator-gluten]

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


##########
backends-velox/src/main/scala/org/apache/gluten/execution/HashAggregateExecTransformer.scala:
##########
@@ -146,7 +146,7 @@ abstract class HashAggregateExecTransformer(
           val (sparkOrders, sparkTypes) =
             aggFunc.aggBufferAttributes.map(attr => (attr.name, attr.dataType)).unzip
           val veloxOrders = VeloxIntermediateData.veloxIntermediateDataOrder(aggFunc)
-          val adjustedOrders = sparkOrders.map(veloxOrders.indexOf(_))
+          val adjustedOrders = sparkOrders.map(VeloxIntermediateData.getAttrIndex(veloxOrders, _))

Review Comment:
   This change is to support another situation.
   > Agg functions with inconsistent ordering of intermediate data between Velox and Spark. The
      strings in the Seq comes from the aggBufferAttributes of Spark's aggregate function, and they
      are arranged in the order of fields in Velox's Accumulator. The reason for using a
      two-dimensional Seq is that in some cases, a field in Velox will be mapped to multiple
      Attributes in Spark's aggBufferAttributes. For example, the fourth field of Velox's RegrSlope
      Accumulator is mapped to both xAvg and avg in Spark's RegrSlope aggBufferAttributes. In this
      scenario, when passing the output of Spark's partial aggregation to Velox, we only need to
      take one of them.
   
   `VeloxIntermediateData.getAttrIndex` is used to get the index from a two-dimensional Seq.



-- 
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] [VL] Support regr_slope aggregate function [incubator-gluten]

Posted by "PHILO-HE (via GitHub)" <gi...@apache.org>.
PHILO-HE commented on PR #5216:
URL: https://github.com/apache/incubator-gluten/pull/5216#issuecomment-2031877412

   @liujiayi771, please note `checkOperatorMatch` has been changed to `checkGlutenOperatorMatch`.


-- 
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] [VL] Support regr_slope aggregate function [incubator-gluten]

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

   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] [VL] Support regr_slope aggregate function [incubator-gluten]

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

   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] [VL] Support regr_slope aggregate function [incubator-gluten]

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

   @PHILO-HE CH backend has not fixed this yet.
   ```
   ERROR] /home/jenkins/agent/workspace/gluten/gluten-ci/gluten/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseTPCHSaltNullParquetSuite.scala:1159: error: not found: value checkOperatorMatch
   [2024-04-02T13:11:00.599Z] [ERROR]     runQueryAndCompare(sql)(checkOperatorMatch[ProjectExecTransformer])
   [2024-04-02T13:11:00.599Z] [ERROR]                             ^
   [2024-04-02T13:11:01.551Z] [ERROR] /home/jenkins/agent/workspace/gluten/gluten-ci/gluten2/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseTPCHSaltNullParquetSuite.scala:1159: error: not found: value checkOperatorMatch
   [2024-04-02T13:11:01.564Z] [ERROR]     runQueryAndCompare(sql)(checkOperatorMatch[ProjectExecTransformer])
   [2024-04-02T13:11:01.564Z] [ERROR]                             ^
   [2024-04-02T13:11:02.125Z] [ERROR] one error found
   [2024-04-02T13:11:02.380Z] [ERROR] exception compilation error occurred!!!
   ```


-- 
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] [VL] Support regr_slope aggregate function [incubator-gluten]

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

   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] [VL] Support regr_slope aggregate function [incubator-gluten]

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

   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] [VL] Support regr_slope aggregate function [incubator-gluten]

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

   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] [VL] Support regr_slope aggregate function [incubator-gluten]

Posted by "PHILO-HE (via GitHub)" <gi...@apache.org>.
PHILO-HE commented on PR #5216:
URL: https://github.com/apache/incubator-gluten/pull/5216#issuecomment-2032219805

   > @PHILO-HE CH backend has not fixed this yet. Please help merge #5267 first.
   > 
   > ```
   > ERROR] /home/jenkins/agent/workspace/gluten/gluten-ci/gluten/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseTPCHSaltNullParquetSuite.scala:1159: error: not found: value checkOperatorMatch
   > [2024-04-02T13:11:00.599Z] [ERROR]     runQueryAndCompare(sql)(checkOperatorMatch[ProjectExecTransformer])
   > [2024-04-02T13:11:00.599Z] [ERROR]                             ^
   > [2024-04-02T13:11:01.551Z] [ERROR] /home/jenkins/agent/workspace/gluten/gluten-ci/gluten2/backends-clickhouse/src/test/scala/org/apache/gluten/execution/GlutenClickHouseTPCHSaltNullParquetSuite.scala:1159: error: not found: value checkOperatorMatch
   > [2024-04-02T13:11:01.564Z] [ERROR]     runQueryAndCompare(sql)(checkOperatorMatch[ProjectExecTransformer])
   > [2024-04-02T13:11:01.564Z] [ERROR]                             ^
   > [2024-04-02T13:11:02.125Z] [ERROR] one error found
   > [2024-04-02T13:11:02.380Z] [ERROR] exception compilation error occurred!!!
   > ```
   
   Just merged. Will merge this pr soon, assume CH CI passed before the code rebase.


-- 
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] [VL] Support regr_slope aggregate function [incubator-gluten]

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

   <!--
     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] [VL] Support regr_slope aggregate function [incubator-gluten]

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

   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] [VL] Support regr_slope aggregate function [incubator-gluten]

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

   cc @rui-mo @PHILO-HE, thanks.


-- 
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] [VL] Support regr_slope aggregate function [incubator-gluten]

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

   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] [VL] Support regr_slope aggregate function [incubator-gluten]

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


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