Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 996A1200B5A for ; Thu, 4 Aug 2016 21:35:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 97E82160AB3; Thu, 4 Aug 2016 19:35:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1C5C1160A6A for ; Thu, 4 Aug 2016 21:35:21 +0200 (CEST) Received: (qmail 14114 invoked by uid 500); 4 Aug 2016 19:35:21 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 14090 invoked by uid 99); 4 Aug 2016 19:35:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2016 19:35:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DC5F12C0033 for ; Thu, 4 Aug 2016 19:35:20 +0000 (UTC) Date: Thu, 4 Aug 2016 19:35:20 +0000 (UTC) From: "Taras Bobrovytsky (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (AVRO-1895) DeepCopy does not work with logical types MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 04 Aug 2016 19:35:22 -0000 Taras Bobrovytsky created AVRO-1895: --------------------------------------- Summary: DeepCopy does not work with logical types Key: AVRO-1895 URL: https://issues.apache.org/jira/browse/AVRO-1895 Project: Avro Issue Type: Improvement Affects Versions: 1.8.1 Reporter: Taras Bobrovytsky AvroSchema is taken from a compiled avsc file which contains a decimal field. {code} AvroSchema.Builder builder = AvroSchema.newBuilder(); BigDecimal bd = new BigDecimal(new BigInteger("155"), 3); campaignBuilder.setDecimalField(bd); AvroSchema source = builder.build(); //This line causes an exception AvroSchema.Builder builder1 = AvroSchema.newBuilder(source); {code} Exception: {code} InvocationTargetException: java.math.BigDecimal cannot be cast to java.nio.ByteBuffer {code} The same failure happens with GenericData as well: {code} GenericRecord copy = GenericData.get().deepCopy(AvroSchema.getClassSchema(), source); {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)