Return-Path: X-Original-To: apmail-asterixdb-dev-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F2FD71768D for ; Thu, 20 Aug 2015 07:51:58 +0000 (UTC) Received: (qmail 63680 invoked by uid 500); 20 Aug 2015 07:51:58 -0000 Delivered-To: apmail-asterixdb-dev-archive@asterixdb.apache.org Received: (qmail 63619 invoked by uid 500); 20 Aug 2015 07:51:58 -0000 Mailing-List: contact dev-help@asterixdb.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.incubator.apache.org Delivered-To: mailing list dev@asterixdb.incubator.apache.org Received: (qmail 63606 invoked by uid 99); 20 Aug 2015 07:51:58 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2015 07:51:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id CB6EBC0721 for ; Thu, 20 Aug 2015 07:51:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.9 X-Spam-Level: ** X-Spam-Status: No, score=2.9 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 0J2ZJxe8wRo2 for ; Thu, 20 Aug 2015 07:51:47 +0000 (UTC) Received: from mail-ob0-f175.google.com (mail-ob0-f175.google.com [209.85.214.175]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 57B0C25073 for ; Thu, 20 Aug 2015 07:51:47 +0000 (UTC) Received: by obkg7 with SMTP id g7so25563453obk.3 for ; Thu, 20 Aug 2015 00:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=qKwTDCAeiT0LwhN1NwUqFNmvDP18vv8LtObi4OFawo4=; b=uDYE+9jEnOBRj8xFG2DnixIUKvPr6c6oCbMQ6SS0eDwsRAt+B1DxHeUER/OhrT8Kzr v+6KfGwK+DLtpvI5mOPfPMe++0t72nJK9qi+UKpkt8mrRdsA5slos3zc6jh1PcAn01K2 lfDWBu2CHH2+vIPVs3x9fbLcSTDeZLAAn/l3GOS7zZp6b1pt+AjTWzqlCUlb2jGWbOum Q1BV0TfYNGXjslXPsK4vX2zuCYmCLHuK4ut63O6UDUsoGEt1F6WAtzlRR/k9OjPzBip9 FE/TUnpd4SblECBZoDW39GMoOPp6d75YqBqSHQ+1pugMsT2ALPGViW3CwoBJS4UEGfyz 2atQ== X-Received: by 10.182.109.230 with SMTP id hv6mr1568868obb.22.1440057106715; Thu, 20 Aug 2015 00:51:46 -0700 (PDT) Received: from mikejcarey.local (ip72-219-186-39.oc.oc.cox.net. [72.219.186.39]) by smtp.googlemail.com with ESMTPSA id u132sm595707oie.3.2015.08.20.00.51.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2015 00:51:45 -0700 (PDT) Message-ID: <55D58710.50407@gmail.com> Date: Thu, 20 Aug 2015 00:51:44 -0700 From: Mike Carey User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: dev@asterixdb.incubator.apache.org Subject: Re: ADM round-trip no longer possible? References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------020208050408000405060403" --------------020208050408000405060403 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit I was going to also say that other thing about the "i64" case. :-) W.r.t. the list wrapper, I prefer (a) because I don't think we should have the notion that the query output is a single data model instance - I kinda think we should have a model where the inputs and outputs can br multiple instances. Otherwise we'll create a world that's potentially very unfriendly to streaming, etc. If someone wants to deal with single lists, they can wrap the result into one. (But they shouldn't do that if they want to create a load-friendly result.) Note that this is all consistent with the persistence model we have, too - datasets are not really in the data model of instances - they are containers for (often large) collections of data model instances. Cheers, Mike On 8/19/15 6:47 PM, Till Westmann wrote: > I agree, that we don't need to print the 'd', but we probably also should accept (and ignore) it when parsing. > > Wrt the list wrapper, I think that we've added that to the HTTP API to ensure that we get a valid instance of the data model. So this would be an artifact of the HTTP interface and not part of the result. And I think that we shouldn't simply ignore it on bulkload, as somebody might actually want to load lists (even though I don't know what to load them into right now ...). > I think that the 2 options on this are > a) add an option to the HTTP interface to not wrap the output sequence in a list and > b) add an option to the bulkload to ignore an enclosing list. > Right now I prefer b). > > Thoughts? > > Cheers, > Till > > > >> On Aug 19, 2015, at 18:14, Ian Maxon wrote: >> >> Interesting. I'm not sure I see the value in the suffix, as the default is >> double. >> >> While we are at it in fixing this, we should remove the outer list wrapper >> (or fix the ADM bulkload to accept that as input). Otherwise again, one >> can't roundtrip. >> >> - Ian >> >>> On Wed, Aug 19, 2015 at 5:53 PM, Taewoo Kim wrote: >>> >>> In adm.grammar file, DOUBLE_LITERAL doesn't have information about "d" >>> suffix unlike the other numeric cases. This means that, for the real DOUBLE >>> values, the output of ADM shouldn't have "d" in it? The ADoublePrinter >>> class is printing "d" as suffix when it generates a double output: ps >>> .print(ADoubleSerializerDeserializer.getDouble(b, s + 1) + "d"); Which way >>> is the correct way? We need to remove "d" suffix? The adm.grammar file >>> assumes so. >>> >>> >>> INT_LITERAL = signOrNothing(), digitSequence() >>> >>> INT8_LITERAL = token(INT_LITERAL), string(i8) >>> >>> INT16_LITERAL = token(INT_LITERAL), string(i16) >>> >>> INT32_LITERAL = token(INT_LITERAL), string(i32) >>> >>> INT64_LITERAL = token(INT_LITERAL), string(i64) >>> >>> >>> @EXPONENT = caseInsensitiveChar(e), signOrNothing(), >>> digitSequence() >>> >>> >>> DOUBLE_LITERAL = signOrNothing(), char(.), digitSequence() >>> >>> DOUBLE_LITERAL = signOrNothing(), digitSequence(), char(.), digitSequence() >>> >>> DOUBLE_LITERAL = signOrNothing(), digitSequence(), char(.), >>> digitSequence(), token(@EXPONENT) >>> >>> DOUBLE_LITERAL = signOrNothing(), digitSequence(), token(@EXPONENT) >>> >>> >>> FLOAT_LITERAL = token(DOUBLE_LITERAL), caseInsensitiveChar(f) >>> >>> >>> >>> Best, >>> Taewoo >>> >>>> On Wed, Aug 19, 2015 at 3:15 PM, Mike Carey wrote: >>>> >>>> We definitely need this to work. 😃 >>>>> On Aug 19, 2015 9:36 AM, "Ian Maxon" wrote: >>>>> >>>>> Yes I am just trying to bulk load from an ADM file that's the result of >>>>> querying. It's annoying to have to mangle it with sed or similar, as >>> its >>>>> about 4GB. >>>>> On Aug 19, 2015 2:41 AM, "Chris Hillery" >>> wrote: >>>>>> I noticed that the output wasn't re-parseable as input last week when >>>>>> coming up with the proposed JSON serialization. In particular, the >>>>> numeric >>>>>> suffixes like 0.0d, 15i8, 333333i32, and so on didn't parse as AQL >>>>>> (although interestingly 32.5f does). I wasn't aware that it used to >>>> work, >>>>>> though. It's an odd disconnect between ADM and AQL, at the least. It >>>>> sounds >>>>>> like you're seeing the same issue when parsing as actual ADM? >>>>>> >>>>>> Ceej >>>>>> aka Chris Hillery >>>>>> >>>>>>> On Wed, Aug 19, 2015 at 1:43 AM, Ian Maxon wrote: >>>>>>> >>>>>>> Hi, >>>>>>> Has ADM output from Asterix stopped being round-trippable? I'm >>> trying >>>>> to >>>>>>> load a record I got from dumping from another instance, via the >>> REST >>>>> API, >>>>>>> requesting 'application-x-adm' in the accept header. First I had to >>>>>> remove >>>>>>> the outer wrapper list that was added a while back, which I suppose >>>>> isn't >>>>>>> awful, but now it seems like I'm getting more subtle errors. For >>>>> example, >>>>>>> trying to load a record, and the parse fails once it sees a field >>>> like >>>>>> this >>>>>>> in a record : >>>>>>> >>>>>>> { ... , "Rank": 0.0d, .... } >>>>>>> >>>>>>> With: >>>>>>> >>>>>>> Parse error at (1, 4421) expecting: >>>>>>> >>>>>>> [AdmLexerException] >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> >>>>>>> Thanks, >>>>>>> - Ian --------------020208050408000405060403--