You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "ArnavBalyan (via GitHub)" <gi...@apache.org> on 2025/04/22 13:22:08 UTC
[PR] Arnavb/array integral cast [incubator-gluten]
ArnavBalyan opened a new pull request, #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396
## What changes were proposed in this pull request?
- Support array cast for integrals.
- Currently supports int/long, others will need velox support, will be added in upcoming change.
- Depends on #9394
## How was this patch tested?
- Unit tests added.
- Existing Spark tests.
--
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] [GLUTEN-9392] [VL] DNM Under test [incubator-gluten]
Posted by "ArnavBalyan (via GitHub)" <gi...@apache.org>.
ArnavBalyan commented on PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#issuecomment-2821319548
cc @PHILO-HE
--
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] [GLUTEN-9392][VL] Support casting double to integral types for array elements [incubator-gluten]
Posted by "PHILO-HE (via GitHub)" <gi...@apache.org>.
PHILO-HE commented on code in PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#discussion_r2071793409
##########
cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc:
##########
@@ -245,6 +245,13 @@ bool isSupportedArrayCast(const TypePtr& fromType, const TypePtr& toType) {
return kAllowedArrayElementKinds.count(fromType->kind()) > 0;
}
+ if (toType->kind() == TypeKind::DOUBLE) {
Review Comment:
Use `toType->isDouble()` for simplicity.
--
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] [GLUTEN-9392] [VL] DNM Under test [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#issuecomment-2821319716
https://github.com/apache/incubator-gluten/issues/9392
--
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] [GLUTEN-9392][VL] Support casting double to integral types for array elements [incubator-gluten]
Posted by "PHILO-HE (via GitHub)" <gi...@apache.org>.
PHILO-HE commented on code in PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#discussion_r2071793629
##########
cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc:
##########
@@ -245,6 +245,13 @@ bool isSupportedArrayCast(const TypePtr& fromType, const TypePtr& toType) {
return kAllowedArrayElementKinds.count(fromType->kind()) > 0;
}
+ if (toType->kind() == TypeKind::DOUBLE) {
+ if (fromType->kind() == TypeKind::INTEGER || fromType->kind() == TypeKind::BIGINT ||
+ fromType->kind() == TypeKind::SMALLINT || fromType->kind() == TypeKind::TINYINT) {
Review Comment:
ditto.
##########
cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc:
##########
@@ -245,6 +245,13 @@ bool isSupportedArrayCast(const TypePtr& fromType, const TypePtr& toType) {
return kAllowedArrayElementKinds.count(fromType->kind()) > 0;
}
+ if (toType->kind() == TypeKind::DOUBLE) {
Review Comment:
Use `toType->isDouble` for simplicity.
--
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] [GLUTEN-9392] [VL] Support array decimal to/from integral casts [incubator-gluten]
Posted by "ArnavBalyan (via GitHub)" <gi...@apache.org>.
ArnavBalyan commented on PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#issuecomment-2841872547
cc @PHILO-HE could you please take a look 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] [GLUTEN-9392] [VL] Support array decimal to/from integral casts [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#issuecomment-2839247477
Run Gluten Clickhouse CI on x86
--
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] [GLUTEN-9392][VL] Support casting double to integral types for array elements [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#issuecomment-2848228165
Run Gluten Clickhouse CI on x86
--
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] [GLUTEN-9392][VL] Support casting double to integral types for array elements [incubator-gluten]
Posted by "ArnavBalyan (via GitHub)" <gi...@apache.org>.
ArnavBalyan commented on PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#issuecomment-2850888692
cc @PHILO-HE if you could please take a look 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] Arnavb/array integral cast [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#issuecomment-2821318507
<!--
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] [GLUTEN-9392] [VL] Support array decimal to/from integral casts [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#issuecomment-2839793676
Run Gluten Clickhouse CI on x86
--
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] [GLUTEN-9392][VL] Support casting double to integral types for array elements [incubator-gluten]
Posted by "ArnavBalyan (via GitHub)" <gi...@apache.org>.
ArnavBalyan commented on code in PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#discussion_r2072214106
##########
cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc:
##########
@@ -245,6 +245,13 @@ bool isSupportedArrayCast(const TypePtr& fromType, const TypePtr& toType) {
return kAllowedArrayElementKinds.count(fromType->kind()) > 0;
}
+ if (toType->kind() == TypeKind::DOUBLE) {
Review Comment:
updated thanks
##########
cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc:
##########
@@ -245,6 +245,13 @@ bool isSupportedArrayCast(const TypePtr& fromType, const TypePtr& toType) {
return kAllowedArrayElementKinds.count(fromType->kind()) > 0;
}
+ if (toType->kind() == TypeKind::DOUBLE) {
+ if (fromType->kind() == TypeKind::INTEGER || fromType->kind() == TypeKind::BIGINT ||
+ fromType->kind() == TypeKind::SMALLINT || fromType->kind() == TypeKind::TINYINT) {
Review Comment:
done
--
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] [GLUTEN-9392] [VL] DNM Under test [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#issuecomment-2838810641
Run Gluten Clickhouse CI on x86
--
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] [GLUTEN-9392] [VL] DNM Under test [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#issuecomment-2838880687
Run Gluten Clickhouse CI on x86
--
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] [GLUTEN-9392] [VL] DNM Under test [incubator-gluten]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396#issuecomment-2821319136
Run Gluten Clickhouse CI on x86
--
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] [GLUTEN-9392][VL] Support casting integral types to double for array elements [incubator-gluten]
Posted by "PHILO-HE (via GitHub)" <gi...@apache.org>.
PHILO-HE merged PR #9396:
URL: https://github.com/apache/incubator-gluten/pull/9396
--
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