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 6DB66200D18 for ; Wed, 27 Sep 2017 05:19:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6C3631609EA; Wed, 27 Sep 2017 03:19:13 +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 3E7431609D7 for ; Wed, 27 Sep 2017 05:19:12 +0200 (CEST) Received: (qmail 57000 invoked by uid 500); 27 Sep 2017 03:19:11 -0000 Mailing-List: contact user-help@kylin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@kylin.apache.org Delivered-To: mailing list user@kylin.apache.org Received: (qmail 56990 invoked by uid 99); 27 Sep 2017 03:19:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Sep 2017 03:19:11 +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 AEF611821A3 for ; Wed, 27 Sep 2017 03:19:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-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-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id b2wI17wSMm6n for ; Wed, 27 Sep 2017 03:19:09 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 203665FB89 for ; Wed, 27 Sep 2017 03:19:09 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id l196so6346208lfl.1 for ; Tue, 26 Sep 2017 20:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=sB+T4bcvRt29dMz5L+PLqTS1F2EQOZx66b2L50FGHSM=; b=rNcw7+MQtFBYkUW+Z2AhuyZF7HA5/+5cll+nPs0tDPCV7nd+QIztYFUbQcLwlBVQ6f RBkS6NaC4tqVvX/sN73dCVxMTx95pX/2OhcNE+adYHGI1rmGBQNtlWmj9GqeUeTgRoMd w0Sbx/ofUN8XLBjqlB2TWEc/kEChLOsU0bUsHRuHgatPi7wEGhEIeUdmx5p0HQtwKhkD ZHcobet8aQ25sI0+ibm3ZjEvV3v+E4iGljIT5JfXuCf90F8Sq0OxMALxzamjCTC+jrMx iy5j5Km+RjJGGym5tVys93Fy4r7utQ3ywcx279PQ9da0ul8RXS7uhYPJHc8MfshBavPz bFVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=sB+T4bcvRt29dMz5L+PLqTS1F2EQOZx66b2L50FGHSM=; b=gtcp5KqBHWHhmUL3K4Jk3lK7YO96UnblHoMH7ggsR3ag4tFzgtWj99275u2+rq8bE1 8YwhfeQvwlppVUObpAh5N70qfCjdrW1Se8end6h6yH5jNXnsqWDA6oP0ZovI4IX02by7 Bx9fCPdLCRtJxXXHl9do15PILKBTcBfNXNmrgLzGnn1Fcq+ksPk+w43ot7L33UdF1B5R evawjqx5jqf0Ff+ZJZR81TAK3ucfrF5Pp97aCH4bfnv8KyZ4C70RzKimiJhEc4gUaGZ1 pa9XYbH25FEaBTdfAFEhxe1OafL+YymlycyTAWljgAQ/q2eoOpPIdX5AoOuo2RNT7mP2 O6PQ== X-Gm-Message-State: AMCzsaVriKZy1edx5YNyf0cVVyEIRjlaACCXyNDICTVgitUsTFEU8/IA wpsTUD9LLL263EplZvlczB6QURh3jQCFMSRLgto= X-Google-Smtp-Source: AOwi7QAztHhVjoy2HLsHJmNgCR+XpSy0CRBrBrpnLHAg3Ii9n+qkUjoUkNUHsPJl4pqKBq1IElBrfXIB334Y4rx+8YU= X-Received: by 10.25.87.74 with SMTP id l71mr8031lfb.26.1506482348524; Tue, 26 Sep 2017 20:19:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.22.153 with HTTP; Tue, 26 Sep 2017 20:19:08 -0700 (PDT) In-Reply-To: References: From: yu feng Date: Wed, 27 Sep 2017 11:19:08 +0800 Message-ID: Subject: Re: query return error result. To: user@kylin.apache.org Content-Type: multipart/alternative; boundary="001a11418dd23e89c2055a2341e8" archived-at: Wed, 27 Sep 2017 03:19:13 -0000 --001a11418dd23e89c2055a2341e8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I add some log and find data from hbase is incorrect. 2017-09-27 11:17 GMT+08:00 yu feng : > I have a cube like this : > dimensions : source_type, source_id, name, dt > measures:count(distinct uid), count(1) , count(distinct buyer) > > I run the query : > > select source_type, source_id, name, > count(distinct uid), count(uid) as cnum, count(distinct buyer) as > buyerNum, > count(buyer) as bnum > from > table_name > where > dt between '2017-06-01' and '2017-09-18' > and source_id is not null > and source_type is not null > group by > source_type, source_id, name > order by buyerNum desc limit 1 offset 0 > > return : > > mv > 423031 > =E8=B5=B7=E7=82=B9=E2=80=A7=E7=BB=88=E7=AB=99 > 193794 > 92 > 42043 > 92 > > > > > > obviously, it is error result, I query the sourceid like this: > > select source_type, source_id, name, > count(distinct uid), count(uid) as cnum, count(distinct buyer) as > buyerNum, > count(buyer) as bnum > from > vip_buying_funnel_cube_view > where > dt between '2017-06-01' and '2017-09-18' > and source_id is not null > and source_type is not null > and source_id =3D '423031' > group by > source_type, source_id, name > order by buyerNum desc limit 1 offset 0 > > the result is corrent : > > mv > 423031 > =E8=B5=B7=E7=82=B9=E2=80=A7=E7=BB=88=E7=AB=99 > 77 > 92 > 11 > 92 > --001a11418dd23e89c2055a2341e8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I add some log and find data from hbase is incorrect.=C2= =A0

2017-09-= 27 11:17 GMT+08:00 yu feng <olaptestyu@gmail.com>:
I have a cube like this :
= dimensions :=C2=A0source_type, source_id, name, dt
measures:count= (distinct uid), count(1) , count(distinct buyer)

I= run the query :

select source_type, source_i= d, name,=C2=A0
=C2=A0 =C2=A0 count(distinct uid), count(uid) as c= num, count(distinct buyer) as buyerNum,
=C2=A0 =C2=A0 count(buyer= ) as bnum =C2=A0
from =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2= =A0 =C2=A0 table_name
where =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 dt between '2017-06-01' and '2017-09-18'
=C2=A0 =C2=A0 and source_id is not null =C2=A0 =C2=A0 =C2=A0 =C2=A0<= /div>
=C2=A0 =C2=A0 and source_type is not null
group by =C2= =A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 source_type, source_id, na= me=C2=A0
order by buyerNum desc limit 1 offset 0
=
return :
=C2=A0
m= v
423031
193794
92
42043
=
92





obviously, it is error = result, I query the sourceid like this:

s= elect source_type, source_id, name,=C2=A0
=C2=A0 =C2=A0 count(dis= tinct uid), count(uid) as cnum, count(distinct buyer) as buyerNum,
=C2=A0 =C2=A0 count(buyer) as bnum =C2=A0
from =C2=A0 =C2=A0 = =C2=A0 =C2=A0
=C2=A0 =C2=A0 vip_buying_funnel_cube_view
where =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 dt between '= 2017-06-01' and '2017-09-18'
=C2=A0 =C2=A0 and source= _id is not null =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 and sou= rce_type is not null
=C2=A0 =C2=A0 and source_id =3D '423031&= #39;
group by
=C2=A0 =C2=A0 source_type, source_id, nam= e=C2=A0
order by buyerNum desc limit 1 offset 0
<= br>
the result is corrent :

mv
423031
=E8=B5=B7=E7=82=B9=E2=80=A7=E7=BB=88=E7=AB=99
<= div class=3D"m_2670954687429549414gmail-ui-grid-cell m_2670954687429549414g= mail-ng-scope m_2670954687429549414gmail-ui-grid-coluiGrid-01P9" id=3D"m_26= 70954687429549414gmail-1506052459195-0-uiGrid-01P9-cell" style=3D"box-sizin= g:border-box;overflow:hidden;float:left;background-color:rgb(253,253,253);b= order-right:1px solid rgb(212,212,212);border-top-color:rgb(212,212,212);bo= rder-bottom:0px solid rgb(212,212,212);border-left-color:rgb(212,212,212);h= eight:30px;min-width:120px;max-width:120px;color:rgb(51,51,51);font-family:= "Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px">
77
92
11
92

--001a11418dd23e89c2055a2341e8--