We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc226a7 commit ff1349cCopy full SHA for ff1349c
sql/src/main/scala/app/softnetwork/elastic/sql/parser/Parser.scala
@@ -69,7 +69,11 @@ object Parser
69
query: String
70
): Either[ParserError, Either[SQLSearchRequest, SQLMultiSearchRequest]] = {
71
val normalizedQuery =
72
- query.split("\n").map(_.trim).filterNot(_.isEmpty).filterNot(_.startsWith("--")).mkString(" ")
+ query
73
+ .split("\n")
74
+ .map(_.split("--")(0).trim)
75
+ .filterNot(w => w.isEmpty || w.startsWith("--"))
76
+ .mkString(" ")
77
val reader = new PackratReader(new CharSequenceReader(normalizedQuery))
78
parse(requests, reader) match {
79
case NoSuccess(msg, _) =>
0 commit comments