File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis
core/src/test/scala/org/apache/spark/sql Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -981,7 +981,7 @@ class Analyzer(
981
981
// support CURRENT_DATE and CURRENT_TIMESTAMP
982
982
val literalFunctions = Seq (CurrentDate (), CurrentTimestamp ())
983
983
val name = nameParts.head
984
- val func = literalFunctions.find(e => resolver (e.prettyName, name))
984
+ val func = literalFunctions.find(e => caseInsensitiveResolution (e.prettyName, name))
985
985
func.map(wrapper)
986
986
}
987
987
Original file line number Diff line number Diff line change @@ -631,6 +631,14 @@ class SQLQuerySuite extends QueryTest with SharedSQLContext {
631
631
}
632
632
}
633
633
634
+ test(" current_date with case sensitive" ) {
635
+ withSQLConf(SQLConf .CASE_SENSITIVE .key -> " true" ) {
636
+ checkAnswer(
637
+ sql(" SELECT DATEDIFF(CURRENT_DATE, current_date)" ),
638
+ Row (0 ))
639
+ }
640
+ }
641
+
634
642
test(" inner join where, one match per row" ) {
635
643
withSQLConf(SQLConf .CASE_SENSITIVE .key -> " true" ) {
636
644
checkAnswer(
You can’t perform that action at this time.
0 commit comments