zhongjiajie commented on code in PR #9673:
URL: https://github.com/apache/dolphinscheduler/pull/9673#discussion_r856802331
##########
dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/sql.py:
##########
@@ -77,9 +77,7 @@ def __init__(
@property
def sql_type(self) -> int:
"""Judgement sql type, use regexp to check which type of the sql is."""
- pattern_select_str = (
- "^(?!(.* |)insert |(.* |)delete |(.* |)drop |(.* |)update |(.*
|)alter ).*"
- )
+ pattern_select_str = "^(?!(.* |)insert |(.* |)delete |(.* |)drop |(.*
|)update |(.* |)alter |(.* |)create ).*"
Review Comment:
you should also add test case about SQL syntac `create table` in
https://github.com/apache/dolphinscheduler/blob/0c7aa4e2c5af05a1df099e1ba29cef876446f79e/dolphinscheduler-python/pydolphinscheduler/tests/tasks/test_sql.py#L28-L64
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]