Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.apache.spark.sql.catalyst.util.GenericArrayData;
import org.apache.spark.sql.errors.QueryExecutionErrors;
import org.apache.spark.unsafe.types.UTF8String;
import org.apache.spark.util.VersionUtils;
import org.apache.spark.util.random.XORShiftRandom;

/**
Expand Down Expand Up @@ -183,7 +182,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