Skip to content

Commit 076009b

Browse files
dongjoon-hyunrxin
authored andcommitted
[SPARK-13400] Stop using deprecated Octal escape literals
## What changes were proposed in this pull request? This removes the remaining deprecated Octal escape literals. The followings are the warnings on those two lines. ``` LiteralExpressionSuite.scala:99: Octal escape literals are deprecated, use \u0000 instead. HiveQlSuite.scala:74: Octal escape literals are deprecated, use \u002c instead. ``` ## How was this patch tested? Manual. During building, there should be no warning on `Octal escape literals`. ``` mvn -DskipTests clean install ``` Author: Dongjoon Hyun <[email protected]> Closes apache#11584 from dongjoon-hyun/SPARK-13400.
1 parent d57daf1 commit 076009b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/LiteralExpressionSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class LiteralExpressionSuite extends SparkFunSuite with ExpressionEvalHelper {
9696
test("string literals") {
9797
checkEvaluation(Literal(""), "")
9898
checkEvaluation(Literal("test"), "test")
99-
checkEvaluation(Literal("\0"), "\0")
99+
checkEvaluation(Literal("\u0000"), "\u0000")
100100
}
101101

102102
test("sum two literals") {

sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveQlSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class HiveQlSuite extends SparkFunSuite with BeforeAndAfterAll {
7171
CatalogColumn("dt", "string", comment = Some("date type")) ::
7272
CatalogColumn("hour", "string", comment = Some("hour of the day")) :: Nil)
7373
assert(desc.storage.serdeProperties ==
74-
Map((serdeConstants.SERIALIZATION_FORMAT, "\054"), (serdeConstants.FIELD_DELIM, "\054")))
74+
Map((serdeConstants.SERIALIZATION_FORMAT, "\u002C"), (serdeConstants.FIELD_DELIM, "\u002C")))
7575
assert(desc.storage.inputFormat == Some("org.apache.hadoop.hive.ql.io.RCFileInputFormat"))
7676
assert(desc.storage.outputFormat == Some("org.apache.hadoop.hive.ql.io.RCFileOutputFormat"))
7777
assert(desc.storage.serde ==

0 commit comments

Comments
 (0)