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 0896D200C8F for ; Fri, 9 Jun 2017 20:35:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 07469160BCA; Fri, 9 Jun 2017 18:35:23 +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 4E468160BB6 for ; Fri, 9 Jun 2017 20:35:22 +0200 (CEST) Received: (qmail 29460 invoked by uid 500); 9 Jun 2017 18:35:21 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 29447 invoked by uid 99); 9 Jun 2017 18:35:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jun 2017 18:35:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id F297BC677B for ; Fri, 9 Jun 2017 18:35:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.211 X-Spam-Level: X-Spam-Status: No, score=-99.211 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id S39bNZl0bvJa for ; Fri, 9 Jun 2017 18:35:20 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 31DCF5FC99 for ; Fri, 9 Jun 2017 18:35:20 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 70B84E0DCC for ; Fri, 9 Jun 2017 18:35:19 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4A1D921E16 for ; Fri, 9 Jun 2017 18:35:18 +0000 (UTC) Date: Fri, 9 Jun 2017 18:35:18 +0000 (UTC) From: "Ethan Wang (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (PHOENIX-153) Implement TABLESAMPLE clause MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 09 Jun 2017 18:35:23 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16044823#comment-16044823 ] Ethan Wang edited comment on PHOENIX-153 at 6/9/17 6:34 PM: ------------------------------------------------------------ Spec of this patch. Feedback plz. ++ ++Belows are SUPPORTED ++ ===BASE CASE==== select * from Person; select * from PERSON TABLESAMPLE 0.45; ===WHERE CLAUSE==== select * from PERSON where ADDRESS = 'CA' OR name>'tina3'; select * from PERSON TABLESAMPLE 0.49 where ADDRESS = 'CA' OR name>'tina3'; select * from PERSON TABLESAMPLE 0.49 where ADDRESS = 'CA' OR name>'tina3' LIMIT 1; ===Wired Table=== select * from LOCAL_ADDRESS TABLESAMPLE 0.79; select * from SYSTEM.STATS TABLESAMPLE 0.41; ===CORNER CASE=== select * from PERSON TABLESAMPLE 0; select * from PERSON TABLESAMPLE 1.45; select * from PERSON TABLESAMPLE kko; ++ ++belows are NOT SUPPORTED ++ ===Subquery and outter join not supporting=== select * from (select * from PERSON where ADDRESS = 'CA') TABLESAMPE 0.2 where Name > 'tina10' ===AGGREGATION=== select count( * ) from PERSON TABLESAMPLE 0.5 LIMIT 2 was (Author: aertoria): Spec of this patch. Feedback plz. ++ ++Belows are SUPPORTED ++ ===BASE CASE==== select * from Person; select * from PERSON TABLESAMPLE 0.45; ===WHERE CLAUSE==== select * from PERSON where ADDRESS = 'CA' OR name>'tina3'; select * from PERSON TABLESAMPLE 0.49 where ADDRESS = 'CA' OR name>'tina3'; select * from PERSON TABLESAMPLE 0.49 where ADDRESS = 'CA' OR name>'tina3' LIMIT 1; ===Wired Table=== select * from LOCAL_ADDRESS TABLESAMPLE 0.79; select * from SYSTEM.STATS TABLESAMPLE 0.41; ===CORNER CASE=== select * from PERSON TABLESAMPLE 0; select * from PERSON TABLESAMPLE 1.45; select * from PERSON TABLESAMPLE kko; ++ ++belows are NOT SUPPORTED ++ ===Subquery and outter join not supporting=== select * from (select * from PERSON where ADDRESS = 'CA') TABLESAMPE 0.2 where Name > 'tina10' ===AGGREGATION=== select count(*) from PERSON TABLESAMPLE 0.5 LIMIT 2 > Implement TABLESAMPLE clause > ---------------------------- > > Key: PHOENIX-153 > URL: https://issues.apache.org/jira/browse/PHOENIX-153 > Project: Phoenix > Issue Type: Task > Reporter: James Taylor > Assignee: Ethan Wang > Labels: enhancement > > Support the standard SQL TABLESAMPLE clause by implementing a filter that uses a skip next hint based on the region boundaries of the table to only return n rows per region. -- This message was sent by Atlassian JIRA (v6.3.15#6346)