Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[SPARK-53940][SQL] Function version() should return full spark versio…
…n instead of short version
  • Loading branch information
pan3793 committed Oct 17, 2025
commit 9b1f63dfc8b750ee38bb26cbaa5295f2a6990382
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public static byte[] aesDecrypt(byte[] input,
* Space separated version and revision.
*/
public static UTF8String getSparkVersion() {
String shortVersion = VersionUtils.shortVersion(SparkBuildInfo.spark_version());
String shortVersion = SparkBuildInfo.spark_version();
String revision = SparkBuildInfo.spark_revision();
return UTF8String.fromString(shortVersion + " " + revision);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.spark.sql

import org.apache.spark.{SPARK_REVISION, SPARK_VERSION_SHORT}
import org.apache.spark.{SPARK_REVISION, SPARK_VERSION}
import org.apache.spark.sql.catalyst.expressions.Hex
import org.apache.spark.sql.catalyst.parser.ParseException
import org.apache.spark.sql.functions._
Expand All @@ -42,7 +42,7 @@ class MiscFunctionsSuite extends QueryTest with SharedSparkSession {
val df = sql("SELECT version()")
checkAnswer(
df,
Row(SPARK_VERSION_SHORT + " " + SPARK_REVISION))
Row(SPARK_VERSION + " " + SPARK_REVISION))
assert(df.schema.fieldNames === Seq("version()"))

checkAnswer(df.selectExpr("version()"), df.select(version()))
Expand Down