Repository: cassandra Updated Branches: refs/heads/trunk 908442878 -> d91fb581e
(cqlsh) fix COPY using wrong variable name for time_format patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-10633 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/81e520c5 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/81e520c5 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/81e520c5 Branch: refs/heads/trunk Commit: 81e520c54be8d397abbbbfaa0adf97178beccbf3 Parents: 2ca7599 Author: Stefania Alborghetti <[email protected]> Authored: Tue Nov 3 09:10:22 2015 +0800 Committer: Aleksey Yeschenko <[email protected]> Committed: Fri Nov 6 15:22:42 2015 +0000 ---------------------------------------------------------------------- CHANGES.txt | 1 + bin/cqlsh | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/81e520c5/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index a994ca1..14a7fbd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.12 + * (cqlsh) fix COPY using wrong variable name for time_format (CASSANDRA-10633) * Do not run SizeEstimatesRecorder if a node is not a member of the ring (CASSANDRA-9912) * Improve handling of dead nodes in gossip (CASSANDRA-10298) * Fix logback-tools.xml incorrectly configured for outputing to System.err http://git-wip-us.apache.org/repos/asf/cassandra/blob/81e520c5/bin/cqlsh ---------------------------------------------------------------------- diff --git a/bin/cqlsh b/bin/cqlsh index ca45be3..b56a423 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -1507,7 +1507,7 @@ class Shell(cmd.Cmd): HEADER=false - whether to ignore the first line NULL='' - string that represents a null value ENCODING='utf8' - encoding for CSV output (COPY TO only) - TIME_FORMAT= - timestamp strftime format (COPY TO only) + TIMEFORMAT= - timestamp strftime format (COPY TO only) '%Y-%m-%d %H:%M:%S%z' defaults to time_format value in cqlshrc When entering CSV data on STDIN, you can use the sequence "\." @@ -1816,7 +1816,7 @@ class Shell(cmd.Cmd): encoding = opts.pop('encoding', 'utf8') nullval = opts.pop('null', '') header = bool(opts.pop('header', '').lower() == 'true') - timestamp_format = opts.pop('time_format', self.display_timestamp_format) + time_format = opts.pop('timeformat', self.display_time_format) if dialect_options['quotechar'] == dialect_options['escapechar']: dialect_options['doublequote'] = True del dialect_options['escapechar'] @@ -1839,7 +1839,6 @@ class Shell(cmd.Cmd): meter = RateMeter(10000) try: - dtformats = DateTimeFormat(timestamp_format, self.display_date_format, self.display_nanotime_format) dump = self.prep_export_dump(ks, cf, columns) writer = csv.writer(csvdest, **dialect_options) if header: @@ -1847,7 +1846,7 @@ class Shell(cmd.Cmd): for row in dump: fmt = lambda v: \ format_value(v, output_encoding=encoding, nullval=nullval, - time_format=dtformats, + time_format=time_format, float_precision=self.display_float_precision).strval writer.writerow(map(fmt, row.values())) meter.increment()
