You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ad...@apache.org on 2021/07/13 12:35:50 UTC

[cassandra] branch cassandra-4.0 updated (4dcf7d9 -> 906781e)

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

adelapena pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


    from 4dcf7d9  Merge branch 'cassandra-3.11' into cassandra-4.0
     new 2a8e018  Make cqlsh use the same set of reserved keywords than the server uses
     new 906781e  Merge branch 'cassandra-3.11' into cassandra-4.0

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.txt                           |  1 +
 pylib/cqlshlib/cqlhandling.py         | 23 ++++++++++++++---------
 pylib/cqlshlib/test/test_constants.py |  7 +++----
 src/antlr/Lexer.g                     |  4 ++--
 4 files changed, 20 insertions(+), 15 deletions(-)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra] 01/01: Merge branch 'cassandra-3.11' into cassandra-4.0

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adelapena pushed a commit to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 906781ecbb76bdd6f06e32ee52348e78d98025d1
Merge: 4dcf7d9 2a8e018
Author: Andrés de la Peña <a....@gmail.com>
AuthorDate: Tue Jul 13 13:04:48 2021 +0100

    Merge branch 'cassandra-3.11' into cassandra-4.0

 CHANGES.txt                           |  1 +
 pylib/cqlshlib/cqlhandling.py         | 23 ++++++++++++++---------
 pylib/cqlshlib/test/test_constants.py |  7 +++----
 src/antlr/Lexer.g                     |  4 ++--
 4 files changed, 20 insertions(+), 15 deletions(-)

diff --cc CHANGES.txt
index a16985a,526d8a2..84db328
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,10 -1,5 +1,11 @@@
 -3.11.11
 +4.0.1
 + * Add repaired/unrepaired bytes back to nodetool (CASSANDRA-15282)
 + * Upgrade lz4-java to 1.8.0 to add RH6 support back (CASSANDRA-16753)
 + * Improve DiagnosticEventService.publish(event) logging message of events (CASSANDRA-16749)
 + * Cleanup dependency scopes (CASSANDRA-16704)
 + * Make JmxHistogram#getRecentValues() and JmxTimer#getRecentValues() thread-safe (CASSANDRA-16707)
 +Merged from 3.11:
+  * Make cqlsh use the same set of reserved keywords than the server uses (CASSANDRA-15663)
   * Optimize bytes skipping when reading SSTable files (CASSANDRA-14415)
   * Enable tombstone compactions when unchecked_tombstone_compaction is set in TWCS (CASSANDRA-14496)
   * Read only the required SSTables for single partition queries (CASSANDRA-16737)
diff --cc pylib/cqlshlib/cqlhandling.py
index e4b9fdd,a9c9c6f..3da0ab1
--- a/pylib/cqlshlib/cqlhandling.py
+++ b/pylib/cqlshlib/cqlhandling.py
@@@ -18,20 -18,24 +18,24 @@@
  # i.e., stuff that's not necessarily cqlsh-specific
  
  import traceback
 +
+ import cassandra
 -from . import pylexotron, util
 +from cqlshlib import pylexotron, util
  
  Hint = pylexotron.Hint
  
- # CASSANDRA-16659 - to keep things compact cql_keywords_reserved will not be imported from the drivers anymore
- cql_reserved_keywords = set((
-     'authorize', 'rename', 'set', 'revoke', 'into', 'describe', 'primary', 'columnfamily', 'apply',
-     'table', 'null', 'select', 'if', 'index', 'use', 'from', 'and', 'unlogged', 'create', 'nan', 'to', 'add',
-     'alter', 'schema', 'begin', 'full', 'infinity', 'grant', 'truncate', 'on', 'modify', 'update',
-     'asc', 'entries', 'not', 'using', 'with', 'by', 'is', 'desc', 'insert', 'execute', 'in',
-     'materialized', 'drop', 'batch', 'order', 'keyspace', 'token', 'limit', 'allow', 'of', 'norecursive', 'delete',
-     'where', 'or', 'view'
+ cql_keywords_reserved = set((
+     'add', 'allow', 'alter', 'and', 'apply', 'asc', 'authorize', 'batch', 'begin', 'by', 'columnfamily', 'create',
 -    'default', 'delete', 'desc', 'describe', 'drop', 'entries', 'execute', 'from', 'full', 'grant', 'if', 'in', 'index',
 -    'infinity', 'insert', 'into', 'is', 'keyspace', 'limit', 'materialized', 'mbean', 'mbeans', 'modify', 'nan',
 -    'norecursive', 'not', 'null', 'of', 'on', 'or', 'order', 'primary', 'rename', 'replace', 'revoke', 'schema',
 -    'select', 'set', 'table', 'to', 'token', 'truncate', 'unlogged', 'unset', 'update', 'use', 'using', 'view', 'where',
 -    'with'
++    'delete', 'desc', 'describe', 'drop', 'entries', 'execute', 'from', 'full', 'grant', 'if', 'in', 'index',
++    'infinity', 'insert', 'into', 'is', 'keyspace', 'limit', 'materialized', 'modify', 'nan', 'norecursive', 'not',
++    'null', 'of', 'on', 'or', 'order', 'primary', 'rename', 'revoke', 'schema', 'select', 'set', 'table', 'to', 'token',
++    'truncate', 'unlogged', 'update', 'use', 'using', 'view', 'where', 'with'
  ))
+ """
+ Set of reserved keywords in CQL.
+ 
+ Derived from .../cassandra/src/java/org/apache/cassandra/cql3/ReservedKeywords.java
+ """
  
  
  class CqlParsingRuleSet(pylexotron.ParsingRuleSet):
diff --cc pylib/cqlshlib/test/test_constants.py
index 669e433,8107ffd..746c888
--- a/pylib/cqlshlib/test/test_constants.py
+++ b/pylib/cqlshlib/test/test_constants.py
@@@ -15,10 -15,9 +15,9 @@@
  # limitations under the License.
  
  from os.path import join
- import re
  
  from .basecase import BaseTestCase, cassandra_dir
- from cqlshlib.cqlhandling import cql_reserved_keywords as cqlsh_reserved_keywords
 -from cqlshlib.cqlhandling import cql_keywords_reserved as cql_keywords_reserved
++from cqlshlib.cqlhandling import cql_keywords_reserved
  
  RESERVED_KEYWORDS_SOURCE = join(cassandra_dir, 'src', 'resources', 'org', 'apache', 'cassandra', 'cql3', 'reserved_keywords.txt')
  
@@@ -33,6 -32,6 +32,6 @@@ class TestConstants(BaseTestCase)
          self.assertFalse(cqlsh_not_source, "Reserved keywords in cqlsh not read from source %s."
                           % (RESERVED_KEYWORDS_SOURCE,))
  
-         source_not_cqlsh = source_reserved_keywords - cqlsh_reserved_keywords
+         source_not_cqlsh = source_reserved_keywords - cql_keywords_reserved
          self.assertFalse(source_not_cqlsh, "Reserved keywords in source %s not appearing in cqlsh."
 -                         % (RESERVED_KEYWORDS_SOURCE,))
 +                         % (RESERVED_KEYWORDS_SOURCE,))

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org