File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 10
10
# See the License for the specific language governing permissions and
11
11
# limitations under the License.
12
12
from sqlalchemy .sql import compiler
13
- try :
14
- from sqlalchemy .sql .expression import (
15
- Alias ,
16
- CTE ,
17
- Subquery ,
18
- )
19
- except ImportError :
20
- # For SQLAlchemy versions < 1.4, the CTE and Subquery classes did not explicitly exist
21
- from sqlalchemy .sql .expression import Alias
22
- CTE = type (None )
23
- Subquery = type (None )
13
+ from sqlalchemy .sql .base import DialectKWArgs
14
+
24
15
25
16
# https://trino.io/docs/current/language/reserved.html
26
17
RESERVED_WORDS = {
@@ -125,7 +116,7 @@ def add_catalog(sql, table):
125
116
if table is None :
126
117
return sql
127
118
128
- if isinstance (table , ( Alias , CTE , Subquery ) ):
119
+ if not isinstance (table , DialectKWArgs ):
129
120
return sql
130
121
131
122
if (
You can’t perform that action at this time.
0 commit comments