This is an automated email from the ASF dual-hosted git repository.

alexott pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/master by this push:
     new 526ec5b  [ZEPPELIN-4938] Allow execution of arbitrary CQL commands
526ec5b is described below

commit 526ec5bffb048a05936eac1dd98c7234a884ee8b
Author: Alex Ott <alex...@apache.org>
AuthorDate: Mon Jul 6 13:00:53 2020 +0200

    [ZEPPELIN-4938] Allow execution of arbitrary CQL commands
    
    ### What is this PR for?
    
    Right now, Cassandra interpreter is very restrictive & allows execution 
only of the predefined set of the commands, and this doesn't allow to execute 
CQL commands that are extension of the core of CQL.  This also may require 
additional changes in the Cassandra interpreter if language will be extended.  
This PR allows to execute any command, not only hardcoded.
    
    ### What type of PR is it?
    Improvement
    
    ### What is the Jira issue?
    * https://issues.apache.org/jira/browse/ZEPPELIN-4938
    
    ### How should this be tested?
    *  Tested manually
    * https://travis-ci.org/github/alexott/zeppelin/jobs/705358648
    
    Author: Alex Ott <alex...@apache.org>
    
    Closes #3841 from alexott/ZEPPELIN-4938 and squashes the following commits:
    
    91f003d4a [Alex Ott] [ZEPPELIN-4938] Allow execution of arbitrary CQL 
commands
---
 .../src/main/scala/org/apache/zeppelin/cassandra/ParagraphParser.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/cassandra/src/main/scala/org/apache/zeppelin/cassandra/ParagraphParser.scala 
b/cassandra/src/main/scala/org/apache/zeppelin/cassandra/ParagraphParser.scala
index b0314d5..e57509c 100644
--- 
a/cassandra/src/main/scala/org/apache/zeppelin/cassandra/ParagraphParser.scala
+++ 
b/cassandra/src/main/scala/org/apache/zeppelin/cassandra/ParagraphParser.scala
@@ -71,7 +71,7 @@ object ParagraphParser {
 
   val GENERIC_STATEMENT_PREFIX: Regex =
     """(?is)\s*(?:INSERT|UPDATE|DELETE|SELECT|CREATE|ALTER|
-      |DROP|GRANT|REVOKE|TRUNCATE|LIST|USE)\s+""".r
+      |DROP|GRANT|REVOKE|TRUNCATE|LIST|USE|[a-z]\w+)\s+""".r
 
   val VALID_IDENTIFIER = "[a-z][a-z0-9_]*"
 

Reply via email to