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

[fix](planner) Fix sample partition table #25912

Merged
merged 5 commits into from
Nov 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
7
  • Loading branch information
xinyiZzz committed Oct 26, 2023
commit 7225229cc0bc3c74b723f6302ddd7179cb25c180
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public static void setUp() throws Exception {
Config.enable_batch_delete_by_default = true;
Config.enable_http_server_v2 = false;
UtFrameUtils.createDorisCluster(runningDir);
FeConstants.runningUnitTest = true;
String createTblStmtStr = "create table db1.tbl1(k1 varchar(32),"
+ " k2 varchar(32), k3 varchar(32), k4 int, k5 largeint) "
+ "AGGREGATE KEY(k1, k2,k3,k4,k5) distributed by hash(k1) buckets 3"
Expand Down Expand Up @@ -860,6 +859,7 @@ public void testRandomBucketSelectTablet() throws Exception {

@Test
public void testSelectSampleHashBucketTable() throws Exception {
FeConstants.runningUnitTest = true;
Database db = Env.getCurrentInternalCatalog().getDbOrMetaException("default_cluster:db1");
OlapTable tbl = (OlapTable) db.getTableOrMetaException("table1");
long tabletId = 10031L;
Expand Down Expand Up @@ -961,10 +961,12 @@ public void testSelectSampleHashBucketTable() throws Exception {
OriginalPlanner planner16 = (OriginalPlanner) dorisAssert.query(sql16).internalExecuteOneAndGetPlan();
Set<Long> sampleTabletIds16 = ((OlapScanNode) planner16.getScanNodes().get(0)).getSampleTabletIds();
Assert.assertEquals(1, sampleTabletIds16.size());
FeConstants.runningUnitTest = false;
}

@Test
public void testSelectSampleRandomBucketTable() throws Exception {
FeConstants.runningUnitTest = true;
Database db = Env.getCurrentInternalCatalog().getDbOrMetaException("default_cluster:db1");
OlapTable tbl = (OlapTable) db.getTableOrMetaException("table3");
long tabletId = 10031L;
Expand Down Expand Up @@ -1066,6 +1068,7 @@ public void testSelectSampleRandomBucketTable() throws Exception {
OriginalPlanner planner16 = (OriginalPlanner) dorisAssert.query(sql16).internalExecuteOneAndGetPlan();
Set<Long> sampleTabletIds16 = ((OlapScanNode) planner16.getScanNodes().get(0)).getSampleTabletIds();
Assert.assertEquals(1, sampleTabletIds16.size());
FeConstants.runningUnitTest = false;
}


Expand Down