You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/14 16:48:38 UTC

[GitHub] [airflow] kazanzhy commented on pull request #25713: Fix SQL split string to include `;-less` statements

kazanzhy commented on PR #25713:
URL: https://github.com/apache/airflow/pull/25713#issuecomment-1214413551

   Sorry for being offline. I tried to work on #25259 finally.
   
   
   Initially, I took this code from the drill provider where it was like:
   ``` 
   sql = sqlparse.split(sqlparse.format(self.sql, strip_comments=True))
   no_term_sql = [s[:-1] for s in sql if s[-1] == ';']
    ```
   which is the like current `[s.rstrip(';') for s in splits if s.endswith(';')]`
   
   I tested it with different queries and even with comments and I see that I really missed the query like `'SELECT * FROM table;;;;;'`
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org