[SPARK-53183][SQL] Use Java Files.readString instead of o.a.s.sql.catalyst.util.fileToString#51911
Closed
dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-53183][SQL] Use Java Files.readString instead of o.a.s.sql.catalyst.util.fileToString#51911dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
Files.readString instead of o.a.s.sql.catalyst.util.fileToString#51911dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
Conversation
0a1c44a to
e13c675
Compare
…catalyst.util.fileToString`
e13c675 to
fd1ad5b
Compare
Member
Author
|
Hi, @zhengruifeng . Could you review this method-replacement PR if you have some time, please? |
Member
Author
|
Could you review this PR when you have some time, @yaooqinn ? |
Member
Author
|
Thank you so much. Roughly, at the first run, Java one is faster. |
Member
Author
|
The test failure is a known flaky one. Merged to master. |
Contributor
|
Late LGTM |
Member
Author
|
Thank you, @zhengruifeng . |
baibaichen
added a commit
to baibaichen/gluten
that referenced
this pull request
Dec 22, 2025
…reading in GlutenSQLQueryTestSuite see apache/spark#51911
baibaichen
added a commit
to baibaichen/gluten
that referenced
this pull request
Dec 23, 2025
…reading in GlutenSQLQueryTestSuite see apache/spark#51911
baibaichen
added a commit
to baibaichen/gluten
that referenced
this pull request
Dec 23, 2025
…reading in GlutenSQLQueryTestSuite see apache/spark#51911
baibaichen
added a commit
to baibaichen/gluten
that referenced
this pull request
Dec 24, 2025
…reading in GlutenSQLQueryTestSuite see apache/spark#51911
baibaichen
added a commit
to baibaichen/gluten
that referenced
this pull request
Dec 25, 2025
…reading in GlutenSQLQueryTestSuite see apache/spark#51911
baibaichen
added a commit
to baibaichen/gluten
that referenced
this pull request
Dec 25, 2025
…reading in GlutenSQLQueryTestSuite see apache/spark#51911
baibaichen
added a commit
to baibaichen/gluten
that referenced
this pull request
Dec 29, 2025
…reading in GlutenSQLQueryTestSuite see apache/spark#51911 which removes Spark's fileToString method from Spark code base.
baibaichen
added a commit
to baibaichen/gluten
that referenced
this pull request
Dec 29, 2025
…reading in GlutenSQLQueryTestSuite see apache/spark#51911 which removes Spark's fileToString method from Spark code base.
baibaichen
added a commit
to baibaichen/gluten
that referenced
this pull request
Dec 30, 2025
…reading in GlutenSQLQueryTestSuite see apache/spark#51911 which removes Spark's fileToString method from Spark code base.
baibaichen
added a commit
to baibaichen/gluten
that referenced
this pull request
Dec 30, 2025
…reading in GlutenSQLQueryTestSuite see apache/spark#51911 which removes Spark's fileToString method from Spark code base.
baibaichen
added a commit
to apache/incubator-gluten
that referenced
this pull request
Dec 31, 2025
* [Scala 2.13][IntelliJ] Remove suppression for lint-multiarg-infix warnings in pom.xml see apache/spark#43332 * [Scala 2.13][IntelliJ] Suppress warning for `ContentFile::path` * [Scala 2.13][IntelliJ] Suppress warning for ContextAwareIterator initialization * [Scala 2.13][IntelliJ] Refactor to use Symbol for column references to fix compilation error in Scala 2.13 with IntelliJ compiler: symbol literal is deprecated; use Symbol("i") * [Fix] Replace deprecated fileToString with Files.readString for file reading in GlutenSQLQueryTestSuite see apache/spark#51911 which removes Spark's fileToString method from Spark code base. * [Scala 2.13][IntelliJ] Update the Java compiler release version from 8 to `${java.version}` in the Scala 2.13 profiler to align it with `maven.compiler.target` * [Refactor] Replace usage of `Symbol` with `col` for column references to align with Spark API best practices --------- Co-authored-by: Chang chen <chenchang@apache.com>
QCLyu
pushed a commit
to QCLyu/incubator-gluten
that referenced
this pull request
Jan 8, 2026
* [Scala 2.13][IntelliJ] Remove suppression for lint-multiarg-infix warnings in pom.xml see apache/spark#43332 * [Scala 2.13][IntelliJ] Suppress warning for `ContentFile::path` * [Scala 2.13][IntelliJ] Suppress warning for ContextAwareIterator initialization * [Scala 2.13][IntelliJ] Refactor to use Symbol for column references to fix compilation error in Scala 2.13 with IntelliJ compiler: symbol literal is deprecated; use Symbol("i") * [Fix] Replace deprecated fileToString with Files.readString for file reading in GlutenSQLQueryTestSuite see apache/spark#51911 which removes Spark's fileToString method from Spark code base. * [Scala 2.13][IntelliJ] Update the Java compiler release version from 8 to `${java.version}` in the Scala 2.13 profiler to align it with `maven.compiler.target` * [Refactor] Replace usage of `Symbol` with `col` for column references to align with Spark API best practices --------- Co-authored-by: Chang chen <chenchang@apache.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR aims to use Java 11+
java.nio.file.Files.readStringinstead ofo.a.s.sql.catalyst.util.fileToString. In other words, this PR removes Spark'sfileToStringmethod from Spark code base.Why are the changes needed?
Since Java 11,
Files.readStringexists. So, we don't need to maintainfileToStringmethod. Note that Apache Spark always uses the default value ofencoding,UTF-8.spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/package.scala
Lines 51 to 58 in c77f316
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass the CIs.
BEFORE
AFTER
Was this patch authored or co-authored using generative AI tooling?
No.