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 1BCE2200B0F for ; Fri, 17 Jun 2016 09:10:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1A801160A61; Fri, 17 Jun 2016 07:10:18 +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 39B5F160A50 for ; Fri, 17 Jun 2016 09:10:17 +0200 (CEST) Received: (qmail 25931 invoked by uid 500); 17 Jun 2016 07:10:16 -0000 Mailing-List: contact dev-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list dev@asterixdb.apache.org Received: (qmail 25920 invoked by uid 99); 17 Jun 2016 07:10:16 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2016 07:10:16 +0000 Received: from [192.168.178.32] (p508CE811.dip0.t-ipconnect.de [80.140.232.17]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 7314B1A0178 for ; Fri, 17 Jun 2016 07:10:15 +0000 (UTC) From: "Till Westmann" To: dev@asterixdb.apache.org Subject: Re: new AsterixDB web interface demo up and running Date: Fri, 17 Jun 2016 09:10:12 +0200 Message-ID: <30BAD846-A7CF-4B6D-9F6B-2C8530A2CE49@apache.org> In-Reply-To: <9579300d-31d6-89cd-5305-d05f6289322b@gmail.com> References: <25b99cd9-2d06-da7e-908b-d9e49043bd3d@gmail.com> <9579300d-31d6-89cd-5305-d05f6289322b@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Mailer: MailMate (1.9.4r5234) archived-at: Fri, 17 Jun 2016 07:10:18 -0000 Results for multiple queries are not that easy for the new HTTP API = design [1] that we=E2=80=99re trying to finish right now. For that design we=E2=80= =99re = planning to have many statements, but to only return the result of the last = statement. The challenge with multiple results is that the newer API also returns = quite a bit of metadata (errors, metrics, signature) which would also need to = be available in multiples and complicate the structure of the result = further. Cheers, Till [1] = https://cwiki.apache.org/confluence/display/ASTERIXDB/New+HTTP+API+Design= On 17 Jun 2016, at 2:45, Mike Carey wrote: > Sounds like a bug in the underlying http UI?! It would be nice to = > preserve the multiple-result-area approach that the existing web UI = > uses in that case, somehow... It's interesting that this hasn't come = > up before - we should have test cases for the basic UI for that, I = > would think? > > > On 6/16/16 5:24 PM, Ian Maxon wrote: >> Kaveen and I talked about this earlier today actually, the result = >> (from >> *DB) for the two above queries is actually fine and parseable JSON. = >> It's >> just a labeling issue as the result is shown as if it were 3 records = >> rather >> than 3 lists. >> A more vexing question however that came up is what to do about = >> multiple >> queries in one submission. Right now those come back as multiple JSON >> objects appended to each other apparently. >> >> On Thu, Jun 16, 2016 at 5:14 PM, Mike Carey = >> wrote: >> >>> @Ian & @Chris: Can you provide some helpful hints in the direction = >>> of >>> parsing returned ADM? (Since you are kind of addressing that as we = >>> speak >>> for other reasons?) >>> >>> @Kaveen: Off to a cool start! In terms of the sorts of things that = >>> can >>> come back, *conceptually*, the return clause of a query can yield a = >>> scalar >>> value, an ordered list, an unordered list, or a record. (The = >>> various >>> possible scalar values are all of the data types listed in the ADM = >>> data >>> model spec.) A for-clause actually always returns a list of = >>> whatever the >>> return clause says to return - and a let-clause (I believe) or a = >>> standalone >>> expression can return a singleton object (of any of the = >>> aforementioned >>> forms) if I'm not mistaken. For testing the Web UI, it would = >>> probably be >>> worth coming up with a set of test queries that returns each of = >>> those >>> things. (Mixed of them are also possible - life in semistructured = >>> data >>> land can be messy.) >>> >>> Cheers, >>> >>> Mike >>> >>> >>> On 6/16/16 11:11 AM, Kaveen Rodrigo wrote: >>> >>>> oh I see, Thank you Yingyi, >>>> >>>> I did update the VPS with the fixes for Q1, the only way to fix Q2 = >>>> and the >>>> new query is to write a little parser since that output isn't valid = >>>> json. >>>> >>>> cheers, >>>> Kaveen >>>> >>>> On 16 June 2016 at 22:59, Yingyi Bu wrote: >>>> >>>> Any valid ADM (asterix data model) instance can be a result row. >>>>> ADM: https://ci.apache.org/projects/asterixdb/aql/datamodel.html >>>>> >>>>> A single curly bracket means a record constructor. A record = >>>>> consists of >>>>> fields, where each field is an name-value pair. >>>>> Therefore, >>>>> { >>>>> [1,2,3], >>>>> [2,3,4], >>>>> [5,6,7] >>>>> } >>>>> cannot be a valid result. >>>>> >>>>> But you are able to get >>>>> [1,2,3], >>>>> [2,3,4], >>>>> [5,6,7] >>>>> >>>>> by running the following query: >>>>> >>>>> for $x in [ >>>>> [1,2,3], >>>>> [2,3,4], >>>>> [5,6,7] >>>>> ] >>>>> return $x; >>>>> >>>>> Let me know if you have more questions. >>>>> >>>>> Best, >>>>> Yingyi >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Thu, Jun 16, 2016 at 10:23 AM, Kaveen Rodrigo < >>>>> u.k.k.rodrigo@gmail.com> >>>>> wrote: >>>>> >>>>> Hey Yingyi, >>>>>> I fixed that issue, didn't update the VPS yet. One question Can = >>>>>> there >>>>>> be >>>>>> results which returns arrays? >>>>>> >>>>>> for example >>>>>> { >>>>>> [1,2,3], >>>>>> [2,3,4], >>>>>> [5,6,7] >>>>>> } >>>>>> >>>>>> if that's so, if you have some time can you give me an AQl query = >>>>>> which >>>>>> will produce something like that. >>>>>> >>>>>> thanks in advance, >>>>>> Kaveen >>>>>> >>>>>> On 16 June 2016 at 22:28, Yingyi Bu wrote: >>>>>> >>>>>> Awesome! Thanks, Kaveen! >>>>>>> Best, >>>>>>> Yingyi >>>>>>> >>>>>>> On Thu, Jun 16, 2016 at 9:56 AM, Kaveen Rodrigo < >>>>>>> >>>>>> u.k.k.rodrigo@gmail.com >>>>>> wrote: >>>>>>> Yikes, Thanks Yingyi, >>>>>>>> I never expected the results array to contain values, I'll get = >>>>>>>> on it >>>>>>>> >>>>>>>> On 16 June 2016 at 21:48, Yingyi Bu wrote: >>>>>>>> >>>>>>>> Very cool!! >>>>>>>>> It seems that there is an assumption that returned results are >>>>>>>>> >>>>>>>> records? >>>>>>> For example, you can try the following query: >>>>>>>>> Q1: >>>>>>>>> for $m in dataset Metadata.Dataset >>>>>>>>> return $m.DatasetName; >>>>>>>>> >>>>>>>>> Q2: >>>>>>>>> 1+1; >>>>>>>>> >>>>>>>>> Best, >>>>>>>>> Yingyi >>>>>>>>> >>>>>>>>> >>>>>>>>> On Thu, Jun 16, 2016 at 12:20 AM, Kaveen Rodrigo < >>>>>>>>> >>>>>>>> u.k.k.rodrigo@gmail.com> >>>>>>>> >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>> Hello all, >>>>>>>>>> I have been working on the WebUI for AsterixDB during the = >>>>>>>>>> last >>>>>>>>>> >>>>>>>>> month, >>>>>>> and I >>>>>>>>>> would like to get some input from you guys. There are a = >>>>>>>>>> couple of >>>>>>>>>> >>>>>>>>> visual >>>>>>>>> tweaks to be applied but the base features are pretty much = >>>>>>>>> done. >>>>>>>>>> http://173.82.2.197:19006/ >>>>>>>>>> >>>>>>>>>> please excuse the slow performance of my docker instance, If = >>>>>>>>>> you >>>>>>>>>> >>>>>>>>> want >>>>>>> to >>>>>>>>> check this out locally, It's available here >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>> https://github.com/KaveenR/incubator-asterixdb/commits/asterixdb-13= 75-static-servlet >>>>> >>>>>> cheers, >>>>>>>>>> Kaveen Rodrigo >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Kaveen Rodrigo >>>>>>>>>> Personal Website - (lifeofenigma.com) >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Software Engineering Undergraduate, >>>>>>>>>> Informatics Institute of Technology Sri Lanka (Affiliated = >>>>>>>>>> with >>>>>>>>>> >>>>>>>>> University >>>>>>>>> of Westminster, UK) >>>>>>>>>> >>>>>>>>>> *Contact Information* >>>>>>>>>> >>>>>>>>>> *Mobile* +94779684740 >>>>>>>>>> >>>>>>>>>> *E-Mail* kaveen.2013175@iit.ac.lk | u.k.k.rodrigo@gmail.com >>>>>>>>>> >>>>>>>>>> >>>>>>>> -- >>>>>>>> Kaveen Rodrigo >>>>>>>> Personal Website - (lifeofenigma.com) >>>>>>>> >>>>>>>> >>>>>>>> Software Engineering Undergraduate, >>>>>>>> Informatics Institute of Technology Sri Lanka (Affiliated with >>>>>>>> >>>>>>> University >>>>>>> of Westminster, UK) >>>>>>>> >>>>>>>> *Contact Information* >>>>>>>> >>>>>>>> *Mobile* +94779684740 >>>>>>>> >>>>>>>> *E-Mail* kaveen.2013175@iit.ac.lk | u.k.k.rodrigo@gmail.com >>>>>>>> >>>>>>>> >>>>>> -- >>>>>> Kaveen Rodrigo >>>>>> Personal Website - (lifeofenigma.com) >>>>>> >>>>>> >>>>>> Software Engineering Undergraduate, >>>>>> Informatics Institute of Technology Sri Lanka (Affiliated with >>>>>> University >>>>>> of Westminster, UK) >>>>>> >>>>>> >>>>>> *Contact Information* >>>>>> >>>>>> *Mobile* +94779684740 >>>>>> >>>>>> *E-Mail* kaveen.2013175@iit.ac.lk | u.k.k.rodrigo@gmail.com >>>>>> >>>>>> >>>>