Forráskód Böngészése

[flink] Trim statement semi colon automatically as not supported

Romain 5 éve
szülő
commit
49fd4e6158

+ 3 - 1
desktop/libs/notebook/src/notebook/connectors/flink_sql.py

@@ -108,7 +108,9 @@ class FlinkSqlApi(Api):
     session_id = session['id']
     job_id = None
 
-    resp = self.db.execute_statement(session_id=session_id, statement=snippet['statement'])
+    statement = snippet['statement'].strip().rstrip(';')
+
+    resp = self.db.execute_statement(session_id=session_id, statement=statement)
 
     if resp['statement_types'][0] == 'SELECT':
       job_id = resp['results'][0]['data'][0][0]