Repository: tobymao/sqlglot

Issue:
Queries containing CTE as "stream" are causing an error
### Description
I am encountering an issue similar to [issue](https://github.com/tobymao/sqlglot/issues/4029). While the previous PR addressed cases where the string contained the keyword "stream," I am still experiencing errors when the Common Table Expression (CTE) is explicitly named "stream."

### Sample Code
```
CREATE TABLE foo AS 
WITH stream AS (
    SELECT * FROM bar
)
SELECT * FROM stream;
```

### Error Message
`sqlglot.errors.ParseError: Required keyword: 'this' missing for <class 'sqlglot.expressions.Stream'>.`






Discussion:

Patch:
diff --git a/sqlglot/parser.py b/sqlglot/parser.py
index bb612912..e035dc90 100644
--- a/sqlglot/parser.py
+++ b/sqlglot/parser.py
@@ -3056,7 +3056,11 @@ class Parser(metaclass=_Parser):
         elif self._match(TokenType.DESCRIBE):
             this = self._parse_describe()
         elif self._match_text_seq("STREAM"):
-            this = self.expression(exp.Stream, this=self._parse_function())
+            this = self._parse_function()
+            if this:
+                this = self.expression(exp.Stream, this=this)
+            else:
+                self._retreat(self._index - 1)
         else:
             this = None
 


Test patch:
diff --git a/tests/dialects/test_databricks.py b/tests/dialects/test_databricks.py
index 1dbbfa9a..d0090b9e 100644
--- a/tests/dialects/test_databricks.py
+++ b/tests/dialects/test_databricks.py
@@ -7,6 +7,7 @@ class TestDatabricks(Validator):
     dialect = "databricks"
 
     def test_databricks(self):
+        self.validate_identity("SELECT * FROM stream")
         self.validate_identity("SELECT t.current_time FROM t")
         self.validate_identity("ALTER TABLE labels ADD COLUMN label_score FLOAT")
         self.validate_identity("DESCRIBE HISTORY a.b")