Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/3132#discussion_r20049686
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/SparkSQLParser.scala
---
@@ -97,10 +97,10 @@ class SqlLexical(val keywords: Seq[String]) extends
StdLexical {
/** Generate all variations of upper and lower case of a given string */
def allCaseVersions(s: String, prefix: String = ""): Stream[String] = {
- if (s == "") {
+ if (s.isEmpty) {
Stream(prefix)
} else {
- allCaseVersions(s.tail, prefix + s.head.toLower) ++
+ allCaseVersions(s.tail, prefix + s.head.toLower) #:::
--- End diff --
> Given that these are all materialized eventually
Didn't realize it. However, then why not use List? Since laziness is not
necessary, using Stream is confusing.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]