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 348BD183EA for ; Wed, 19 Aug 2015 17:50:53 +0000 (UTC) Received: (qmail 1456 invoked by uid 500); 19 Aug 2015 17:50:53 -0000 Delivered-To: apmail-asterixdb-dev-archive@asterixdb.apache.org Received: (qmail 1399 invoked by uid 500); 19 Aug 2015 17:50:53 -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 1387 invoked by uid 99); 19 Aug 2015 17:50:52 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Aug 2015 17:50:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6BB6718210F for ; Wed, 19 Aug 2015 17:50:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.901 X-Spam-Level: ** X-Spam-Status: No, score=2.901 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id r-Qt3wne7Jm5 for ; Wed, 19 Aug 2015 17:50:43 +0000 (UTC) Received: from mail-qg0-f42.google.com (mail-qg0-f42.google.com [209.85.192.42]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 9F25A42996 for ; Wed, 19 Aug 2015 17:50:43 +0000 (UTC) Received: by qgeb6 with SMTP id b6so10073801qge.3 for ; Wed, 19 Aug 2015 10:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=0tI1z6BGzQ+GArIPqIXkqzlNzC7vyfvbnUryuPQGckI=; b=VM6PcwUzMy2pjVSHGG7GU7AsXEnM/kYRfTC56YlRAwgwnb6BYlWY33shUplOu7BZlX 8PLQRnvQBZt6NV5OcC9lGKgPxzw1Hs/eG2fds65TvjxcOStMlRyMSvr7N1d6xFe96nkT 5ZLDp4/Nx8CywPHnYWMUvdntRO8s78eOL2+x6DuCBpUTZwpU8r8kKbd5wmwu7f2A62UA zdtyDBQ9xEgmLHPAUsxFfhpT7LlwFgAYPF3fASfIvV/+xNO46bRuqRyCIcxAl1dFFOeB tS8ASI/uSM5Bu+A+k6osfAd9Ai+6WTnVVnMll0X4aacZXaHyAs1/k5VfDTwSF0ppWf/b d99A== X-Received: by 10.140.43.199 with SMTP id e65mr25131123qga.80.1440006643377; Wed, 19 Aug 2015 10:50:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.104.162 with HTTP; Wed, 19 Aug 2015 10:50:23 -0700 (PDT) In-Reply-To: References: From: Taewoo Kim Date: Wed, 19 Aug 2015 10:50:23 -0700 Message-ID: Subject: Re: Strange Comparison Allowed To: dev@asterixdb.incubator.apache.org Content-Type: multipart/alternative; boundary=001a113a9baa73eb1f051dadac7a --001a113a9baa73eb1f051dadac7a Content-Type: text/plain; charset=UTF-8 Sorry. The direction of inequality operator was misleading. STRING 13 is smaller than (<) POINT 20. Best, Taewoo On Wed, Aug 19, 2015 at 10:49 AM, Taewoo Kim wrote: > Yes. Type conversion (casting) only happens among numeric types so far. > Actually, since there is a type-tag, if you try to compare two non numeric > types, it stops the comparing as soon as it sees the first byte from both > side since type-tag itself has the given order (e.g., STRING 13 > POINT > 20). This is required for ORDER BY, too. > > Best, > Taewoo > > On Wed, Aug 19, 2015 at 10:45 AM, Steven Jacobs wrote: > >> I see, so we are technically allowed to compare anything to anything? >> >> Steven >> >> On Wed, Aug 19, 2015 at 10:37 AM, Taewoo Kim wrote: >> >> > If there is no right comparator for the given types (STRING vs POINT), >> then >> > it does the "byte by byte" comparison. >> > >> > Best, >> > Taewoo >> > >> > On Wed, Aug 19, 2015 at 10:32 AM, Steven Jacobs >> wrote: >> > >> > > This is currently working in master: >> > > >> > > create type CSXType as closed { >> > > id: int32, >> > > csxid: string >> > > } >> > > create dataset CSX(CSXType) primary key id; >> > > >> > > for $b in dataset('CSX') >> > > where $b.id > point("3,5") >> > > return $b; >> > > >> > > Is this supposed to be working? >> > > Steven >> > > >> > >> > > --001a113a9baa73eb1f051dadac7a--