Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-153

Implement TABLESAMPLE clause

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.12.0
    • Component/s: None
    • Labels:
    • old issue number:
      22

      Description

      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.

      When TABLESAMPLE clause is used, Phoenix will sample (N) percent of the the hbase table with only O(M) run time complexity. (N is size of table, M is size of stats)

      [Update]
      Usage:
      https://phoenix.apache.org/tablesample.html

      Syntax of using table sampling:
      select * from PERSON TABLESAMPLE(45);
      select count( * ) from PERSON TABLESAMPLE (49) LIMIT 2

      Source Code:
      https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=commitdiff;h=5e33dc12bc088bd0008d89f0a5cd7d5c368efa25

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              aertoria Ethan Wang
              Reporter:
              jamestaylor James R. Taylor

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment