Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 941EC17F2F for ; Tue, 3 Feb 2015 22:38:34 +0000 (UTC) Received: (qmail 33516 invoked by uid 500); 3 Feb 2015 22:38:35 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 33425 invoked by uid 500); 3 Feb 2015 22:38:35 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 33155 invoked by uid 99); 3 Feb 2015 22:38:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2015 22:38:35 +0000 Date: Tue, 3 Feb 2015 22:38:35 +0000 (UTC) From: "Tyler Hobbs (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CASSANDRA-8733) List prepend reverses item order MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Tyler Hobbs created CASSANDRA-8733: -------------------------------------- Summary: List prepend reverses item order Key: CASSANDRA-8733 URL: https://issues.apache.org/jira/browse/CASSANDRA-8733 Project: Cassandra Issue Type: Bug Components: Core Reporter: Tyler Hobbs Assignee: Tyler Hobbs Fix For: 2.1.3, 2.0.13 If you prepend a list of items to a list collection, it will reverse the order of the prepend-list: {noformat} cqlsh:ks1> UPDATE foobar SET b = [2, 3] WHERE a = 0; cqlsh:ks1> select * from foobar; a | b ---+-------- 0 | [2, 3] (1 rows) cqlsh:ks1> UPDATE foobar SET b = [0, 1] + b WHERE a = 0; cqlsh:ks1> select * from foobar; a | b ---+-------------- 0 | [1, 0, 2, 3] (1 rows) {noformat} This is because we're going through the prepend-list in a normal-order for-loop and prepending each time (in Lists.Prepender). -- This message was sent by Atlassian JIRA (v6.3.4#6332)