From d0ea242ca26b3aa34ac63e03484c3d4825cf0d5c Mon Sep 17 00:00:00 2001
From: EmirVildanov <reddog201030@gmail.com>
Date: Tue, 15 Oct 2024 12:53:01 +0300
Subject: [PATCH] fix: modify WHITESPACE requirements in grammar to support
 failing queries

---
 sbroad                  | 2 +-
 test/conftest.py        | 4 ++--
 test/int/test_iproto.py | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sbroad b/sbroad
index b6574768f6..73e6815a33 160000
--- a/sbroad
+++ b/sbroad
@@ -1 +1 @@
-Subproject commit b6574768f67da2d32c659a72e309735c20e90a02
+Subproject commit 73e6815a3399c085fcaff3bca7df86463b284bde
diff --git a/test/conftest.py b/test/conftest.py
index 35582221f3..3e5046bf3e 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -848,7 +848,7 @@ class Instance:
         password: str | None = None,
         timeout: int | float = 10,
     ):
-        sql = f"CREATE USER\"{with_name}\" WITH PASSWORD '{with_password}'" + (
+        sql = f"CREATE USER \"{with_name}\" WITH PASSWORD '{with_password}' " + (
             ("USING " + with_auth) if with_auth else ""
         )
         self.sql(
@@ -1180,7 +1180,7 @@ class Instance:
             f'CREATE TABLE "{name}" ('
             f"{data} "
             f"PRIMARY KEY ({primary_key})) "
-            f"{engine}"
+            f"{engine} "
             f"DISTRIBUTED {distribution} "
             f"OPTION (TIMEOUT = {timeout});",
             timeout=timeout + 0.5,
diff --git a/test/int/test_iproto.py b/test/int/test_iproto.py
index fdf22c6742..d0b59ae884 100644
--- a/test/int/test_iproto.py
+++ b/test/int/test_iproto.py
@@ -86,7 +86,7 @@ def test_iproto_execute(instance: Instance):
         conn.execute(f"SELECT * FRUM {TABLE_NAME}")
     assert dql.value.args[:2] == (
         ErrorCode.Other,
-        f"sbroad: rule parsing error:  --> 1:10\n  |\n1 | SELECT * FRUM {TABLE_NAME}\n  |          ^---\n  |\n  = expected EOI, Limit, UnionOp, ExceptOp, or UnionAllOp",  # noqa: E501
+        f"sbroad: rule parsing error:  --> 1:10\n  |\n1 | SELECT * FRUM {TABLE_NAME}\n  |          ^---\n  |\n  = expected EOI, Limit, UnionOp, ExceptOp, UnionAllOp, or DqlOption",  # noqa: E501
     )
 
     acl = instance.sql(f"GRANT WRITE ON TABLE {TABLE_NAME} TO {USER_NAME}")
-- 
GitLab