Skip to content

Commit

Permalink
use StringLiteral
Browse files Browse the repository at this point in the history
  • Loading branch information
LuciferYang committed Oct 20, 2021
1 parent 75a1ed2 commit 7e8c3d6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,7 @@ case class FormatString(children: Expression*) extends Expression with ImplicitC
* behavior of Java 8, Java 11 and Java 17.
*/
private def checkArgumentIndexNotZero(expression: Expression): Boolean = expression match {
case pattern: Literal if pattern.dataType == StringType => !pattern.toString.contains("%0$")
case StringLiteral(pattern) => !pattern.contains("%0$")
case _ => true
}
}
Expand Down

0 comments on commit 7e8c3d6

Please sign in to comment.