Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add table sampling with fixed shard #15128

Closed
wants to merge 4 commits into from
Closed

Add table sampling with fixed shard #15128

wants to merge 4 commits into from

Conversation

takaaki7
Copy link

@takaaki7 takaaki7 commented Oct 11, 2023

Fixes #15140 .

Description

Add fixed shard table sampling for native query. The details is described in issue.

Release note


Key changed/added classes in this PR
  • MyFoo
  • OurBar
  • TheirBaz

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@takaaki7 takaaki7 changed the title Add table sampling Add table sampling with fixed shard Oct 12, 2023
@@ -117,6 +118,8 @@
{
if (baseDataSource instanceof TableDataSource) {
return Optional.of((TableDataSource) baseDataSource);
} else if (baseDataSource instanceof SampledTableDataSource) {

Check failure

Code scanning / CodeQL

Contradictory type checks Error

This access of
baseDataSource
cannot be of type
SampledTableDataSource
, since
this expression
ensures that it is not of type
TableDataSource
.
@@ -117,6 +118,8 @@
{
if (baseDataSource instanceof TableDataSource) {
return Optional.of((TableDataSource) baseDataSource);
} else if (baseDataSource instanceof SampledTableDataSource) {
return Optional.of((SampledTableDataSource) baseDataSource);

Check failure

Code scanning / CodeQL

Contradictory type checks Error

This access of
baseDataSource
cannot be of type
SampledTableDataSource
, since
this expression
ensures that it is not of type
TableDataSource
.
@@ -216,6 +219,7 @@
public boolean isTableBased()
{
return (baseDataSource instanceof TableDataSource
|| baseDataSource instanceof SampledTableDataSource

Check failure

Code scanning / CodeQL

Contradictory type checks Error

This access of
baseDataSource
cannot be of type
SampledTableDataSource
, since
this expression
ensures that it is not of type
TableDataSource
.
@takaaki7 takaaki7 closed this by deleting the head repository Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Proposal] Fixed-shard table sampling
1 participant