You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "kazuyukitanimura (via GitHub)" <gi...@apache.org> on 2025/03/24 23:30:39 UTC
[PR] fix: isCometEnabled name conflict [datafusion-comet]
kazuyukitanimura opened a new pull request, #1569:
URL: https://github.com/apache/datafusion-comet/pull/1569
## Which issue does this PR close?
## Rationale for this change
We have a name collision on `isCometEnabled`
```
CometSparkSessionExtensions
private[comet] def isCometEnabled(conf: SQLConf): Boolean = {
```
and
```
SQLTestUtilsBase
protected def isCometEnabled: Boolean = SparkSession.isCometEnabled
```
causing build issues depending on which one gets picked up
```
[ERROR] /workspace/spark/src/test/scala/org/apache/comet/CometSparkSessionExtensionsSuite.scala:34: Boolean does not take parameters
[ERROR] /workspace/spark/src/test/scala/org/apache/comet/CometSparkSessionExtensionsSuite.scala:42: Boolean does not take parameters
[ERROR] /workspace/spark/src/test/scala/org/apache/comet/CometSparkSessionExtensionsSuite.scala:47: Boolean does not take parameters
```
## What changes are included in this PR?
Renamed one to `isCometLoaded`
## How are these changes tested?
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: isCometEnabled name conflict [datafusion-comet]
Posted by "kazuyukitanimura (via GitHub)" <gi...@apache.org>.
kazuyukitanimura commented on code in PR #1569:
URL: https://github.com/apache/datafusion-comet/pull/1569#discussion_r2012813465
##########
spark/src/test/scala/org/apache/comet/CometSparkSessionExtensionsSuite.scala:
##########
@@ -27,24 +27,24 @@ class CometSparkSessionExtensionsSuite extends CometTestBase {
import CometSparkSessionExtensions._
- test("isCometEnabled") {
+ test("isCometLoaded") {
val conf = new SQLConf
conf.setConfString(CometConf.COMET_ENABLED.key, "false")
- assert(!isCometEnabled(conf))
+ assert(!isCometLoaded(conf))
Review Comment:
Thanks, I thought about it but since both version of `isCometEnabled` would be still accessible, especially due to
```
import CometSparkSessionExtensions._
```
, this may cause future issues for using `isCometEnabled` like adding new tests.
I am ok with `CometSparkSessionExtensions.isCometEnabled` but changing the name entirely is more future proof? WDTY @parthchandra @comphead
Also `CometSparkSessionExtensions.isCometEnabled` is checking `NativeBase.isLoaded`, so I think `isCometLoaded` makes sense
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: isCometEnabled name conflict [datafusion-comet]
Posted by "kazuyukitanimura (via GitHub)" <gi...@apache.org>.
kazuyukitanimura commented on PR #1569:
URL: https://github.com/apache/datafusion-comet/pull/1569#issuecomment-2752978026
Thanks merged @parthchandra @comphead
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: isCometEnabled name conflict [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #1569:
URL: https://github.com/apache/datafusion-comet/pull/1569#discussion_r2013066694
##########
spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala:
##########
@@ -976,7 +976,7 @@ class CometSparkSessionExtensions
}
// We shouldn't transform Spark query plan if Comet is disabled.
Review Comment:
```suggestion
// We shouldn't transform Spark query plan if Comet is not loaded.
```
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: isCometEnabled name conflict [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #1569:
URL: https://github.com/apache/datafusion-comet/pull/1569#discussion_r2013066556
##########
spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala:
##########
@@ -1174,7 +1174,7 @@ object CometSparkSessionExtensions extends Logging {
/**
* Checks whether Comet extension should be enabled for Spark.
Review Comment:
```suggestion
* Checks whether Comet extension should be loaded for Spark.
```
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: isCometEnabled name conflict [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #1569:
URL: https://github.com/apache/datafusion-comet/pull/1569#discussion_r2012602405
##########
spark/src/test/scala/org/apache/comet/CometSparkSessionExtensionsSuite.scala:
##########
@@ -27,24 +27,24 @@ class CometSparkSessionExtensionsSuite extends CometTestBase {
import CometSparkSessionExtensions._
- test("isCometEnabled") {
+ test("isCometLoaded") {
val conf = new SQLConf
conf.setConfString(CometConf.COMET_ENABLED.key, "false")
- assert(!isCometEnabled(conf))
+ assert(!isCometLoaded(conf))
Review Comment:
+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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: isCometEnabled name conflict [datafusion-comet]
Posted by "kazuyukitanimura (via GitHub)" <gi...@apache.org>.
kazuyukitanimura merged PR #1569:
URL: https://github.com/apache/datafusion-comet/pull/1569
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: isCometEnabled name conflict [datafusion-comet]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1569:
URL: https://github.com/apache/datafusion-comet/pull/1569#issuecomment-2749898991
## [Codecov](https://app.codecov.io/gh/apache/datafusion-comet/pull/1569?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 57.23%. Comparing base [(`f09f8af`)](https://app.codecov.io/gh/apache/datafusion-comet/commit/f09f8af64c6599255e116a376f4f008f2fd63b43?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`59deaef`)](https://app.codecov.io/gh/apache/datafusion-comet/commit/59deaef9452d25f2f680b9ef5f29d9bd7bd27461?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 99 commits behind head on main.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #1569 +/- ##
============================================
+ Coverage 56.12% 57.23% +1.10%
+ Complexity 976 937 -39
============================================
Files 119 122 +3
Lines 11743 12131 +388
Branches 2251 2274 +23
============================================
+ Hits 6591 6943 +352
- Misses 4012 4034 +22
- Partials 1140 1154 +14
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/datafusion-comet/pull/1569?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: isCometEnabled name conflict [datafusion-comet]
Posted by "parthchandra (via GitHub)" <gi...@apache.org>.
parthchandra commented on code in PR #1569:
URL: https://github.com/apache/datafusion-comet/pull/1569#discussion_r2012564968
##########
spark/src/test/scala/org/apache/comet/CometSparkSessionExtensionsSuite.scala:
##########
@@ -27,24 +27,24 @@ class CometSparkSessionExtensionsSuite extends CometTestBase {
import CometSparkSessionExtensions._
- test("isCometEnabled") {
+ test("isCometLoaded") {
val conf = new SQLConf
conf.setConfString(CometConf.COMET_ENABLED.key, "false")
- assert(!isCometEnabled(conf))
+ assert(!isCometLoaded(conf))
Review Comment:
Maybe use `CometSparkSessionExtensions.isCometEnabled` instead of renaming the method?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: isCometEnabled name conflict [datafusion-comet]
Posted by "kazuyukitanimura (via GitHub)" <gi...@apache.org>.
kazuyukitanimura commented on PR #1569:
URL: https://github.com/apache/datafusion-comet/pull/1569#issuecomment-2752028058
> TBH, I don't see how this conflict is occurring. `CometSparkSessionExtensionSuite` has no reference to `SQLTestUtilsBase`
CometSparkSessionExtensionSuite -> CometTestBase -> SQLTestUtils -> SQLTestUtilsBase (in the diff)
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: isCometEnabled name conflict [datafusion-comet]
Posted by "parthchandra (via GitHub)" <gi...@apache.org>.
parthchandra commented on code in PR #1569:
URL: https://github.com/apache/datafusion-comet/pull/1569#discussion_r2013108125
##########
spark/src/test/scala/org/apache/comet/CometSparkSessionExtensionsSuite.scala:
##########
@@ -27,24 +27,24 @@ class CometSparkSessionExtensionsSuite extends CometTestBase {
import CometSparkSessionExtensions._
- test("isCometEnabled") {
+ test("isCometLoaded") {
val conf = new SQLConf
conf.setConfString(CometConf.COMET_ENABLED.key, "false")
- assert(!isCometEnabled(conf))
+ assert(!isCometLoaded(conf))
Review Comment:
> Thanks, I thought about it but since both version of `isCometEnabled` would be still accessible, especially due to
>
> ```
> import CometSparkSessionExtensions._
> ```
>
> , this may cause future issues for using `isCometEnabled` like adding new tests. I am ok with `CometSparkSessionExtensions.isCometEnabled` but changing the name entirely is more future proof? WDTY @parthchandra @comphead Also `CometSparkSessionExtensions.isCometEnabled` is checking `NativeBase.isLoaded`, so I think `isCometLoaded` makes sense
It used to be CometSparkSessionExtensions.isCometEnabled and was changed here: https://github.com/apache/datafusion-comet/commit/badbd376898cb4f80b5136a90697019ad11a2e90
I'm okay with the new name though.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org