This is an automated email from the ASF dual-hosted git repository. smiklosovic pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit e8907eba15fceaf3758baffdedc6b56e26627257 Merge: f2f2ef3f23 b58d8f174d Author: Stefan Miklosovic <smikloso...@apache.org> AuthorDate: Wed Sep 27 12:31:19 2023 +0200 Merge branch 'cassandra-5.0' into trunk CHANGES.txt | 1 + .../pages/managing/operating/virtualtables.adoc | 2 - pylib/cqlshlib/cqlshmain.py | 148 ++++++++++----------- 3 files changed, 68 insertions(+), 83 deletions(-) diff --cc CHANGES.txt index 183367fda2,7c9237d78b..c207f7bfb2 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,9 -1,6 +1,10 @@@ -5.0-alpha2 +5.1 + * Add the ability to disable bulk loading of SSTables (CASSANDRA-18781) + * Clean up obsolete functions and simplify cql_version handling in cqlsh (CASSANDRA-18787) +Merged from 5.0: + * Make the output of ON/OFF commands in cqlsh consistent (CASSANDRA-18547) * Do not create sstable files before registering in txn (CASSANDRA-18737) + * Remove wrong assertion in SSTableLoader (CASSANDRA-18840) * Do not log stacktrace on mismatched cache and schema version and checksum error in AutoSavingCache (CASSANDRA-18862) * Remove wrong assertion in SSTableLoader (CASSANDRA-18840) * Fix accessing java.nio.Bits.TOTAL_CAPACITY in Java17 (CASSANDRA-18848) diff --cc pylib/cqlshlib/cqlshmain.py index 6a05c78344,29bf17da86..1c47af576e --- a/pylib/cqlshlib/cqlshmain.py +++ b/pylib/cqlshlib/cqlshmain.py @@@ -30,8 -32,28 +31,28 @@@ from enum import Enu from io import StringIO from uuid import UUID + import cassandra + from cassandra.auth import PlainTextAuthProvider + from cassandra.cluster import Cluster + from cassandra.cqltypes import cql_typename + from cassandra.marshal import int64_unpack + from cassandra.metadata import (ColumnMetadata, KeyspaceMetadata, TableMetadata) + from cassandra.policies import WhiteListRoundRobinPolicy + from cassandra.query import SimpleStatement, ordered_dict_factory, TraceUnavailable + from cassandra.util import datetime_from_timestamp + + from cqlshlib import cql3handling, pylexotron, sslhandling, cqlshhandling, authproviderhandling + from cqlshlib.copyutil import ExportTask, ImportTask + from cqlshlib.displaying import (ANSI_RESET, BLUE, COLUMN_NAME_COLORS, CYAN, + RED, WHITE, FormattedValue, colorme) + from cqlshlib.formatting import (DEFAULT_DATE_FORMAT, DEFAULT_NANOTIME_FORMAT, + DEFAULT_TIMESTAMP_FORMAT, CqlType, DateTimeFormat, + format_by_type) +from cqlshlib.helptopics import get_html_anchor, get_html_topics + from cqlshlib.tracing import print_trace, print_trace_session + from cqlshlib.util import get_file_encoding_bomsize, is_file_secure + from cqlshlib.serverversion import version as build_version - UTF8 = 'utf-8' description = "CQL Shell for Apache Cassandra" @@@ -280,6 -284,19 +279,11 @@@ class FormatError(DecodeError) verb = 'format' -def full_cql_version(ver): - while ver.count('.') < 2: - ver += '.0' - ver_parts = ver.split('-', 1) + [''] - vertuple = tuple(list(map(int, ver_parts[0].split('.'))) + [ver_parts[1]]) - return ver, vertuple - - + class SwitchState(Enum): + ON = True + OFF = False + + def format_value(val, cqltype, encoding, addcolor=False, date_time_format=None, float_precision=None, colormap=None, nullval=None): if isinstance(val, DecodeError): --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org