File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ def _extract_output_type(
165165 def _extract_output_type_from_sql (self , sql : str ) -> OutputTypeDTO | None :
166166 found = SQL_QUERY_SYNTAX .search (sql )
167167 if found :
168- return QUERY_TYPE_TO_OUTPUT_TYPE [found .group ("query_type" )]
168+ return QUERY_TYPE_TO_OUTPUT_TYPE [found .group ("query_type" ). upper () ]
169169 found = ALTER_SYNTAX .search (sql )
170170 if found :
171171 return OutputTypeDTO .ALTER
Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ def test_extractors_extract_output_batch_with_lifecycle(
261261 [
262262 ("CREATE TABLE AS SELECT * FROM mytable" , OutputTypeDTO .CREATE ),
263263 ("INSERT INTO mytable SELECT * FROM mytable" , OutputTypeDTO .APPEND ),
264+ ("insert into mytable select * from mytable" , OutputTypeDTO .APPEND ),
264265 ("UPDATE mytable SET a=1" , OutputTypeDTO .UPDATE ),
265266 ("DELETE FROM mytable" , OutputTypeDTO .DELETE ),
266267 ("COPY mytable FROM '...'" , OutputTypeDTO .APPEND ),
You can’t perform that action at this time.
0 commit comments