Skip to content

Commit fde26d4

Browse files
committed
fix exclude fields from select for es7
1 parent 3f805c0 commit fde26d4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

sql/bridge/src/test/scala/app/softnetwork/elastic/sql/SQLQuerySpec.scala

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,8 @@ class SQLQuerySpec extends AnyFlatSpec with Matchers {
503503
SQLQuery(
504504
except
505505
)
506-
select.query shouldBe
507-
"""
506+
List(
507+
"""
508508
|{
509509
| "query":{
510510
| "match_all":{}
@@ -513,7 +513,17 @@ class SQLQuerySpec extends AnyFlatSpec with Matchers {
513513
| "includes":["*"],
514514
| "excludes":["col1","col2"]
515515
| }
516+
|}""".stripMargin.replaceAll("\\s+", ""),
517+
"""
518+
|{
519+
| "query":{
520+
| "match_all":{}
521+
| },
522+
| "_source":{
523+
| "excludes":["col1","col2"]
524+
| }
516525
|}""".stripMargin.replaceAll("\\s+", "")
526+
) should contain(select.query)
517527
}
518528

519529
it should "perform complex query" in {

0 commit comments

Comments
 (0)