Skip to content

Commit

Permalink
Fix test failure due to rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoyuki Morita <[email protected]>
  • Loading branch information
ykmr1224 committed Sep 6, 2024
1 parent 49c4feb commit 6f44012
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ public IndexQueryDetails build() {
}

public String openSearchIndexName() {
if (getIndexType() == null) {
return null;
}
FullyQualifiedTableName fullyQualifiedTableName = getFullyQualifiedTableName();
String indexName = StringUtils.EMPTY;
switch (getIndexType()) {
Expand All @@ -105,6 +108,8 @@ public String openSearchIndexName() {
+ strip(getIndexName(), STRIP_CHARS)
+ "_"
+ getIndexType().getSuffix();
} else {
return null;
}
break;
case SKIPPING:
Expand All @@ -114,6 +119,8 @@ public String openSearchIndexName() {
case MATERIALIZED_VIEW:
if (mvName != null) { // mvName is not available for SHOW MATERIALIZED VIEW query
indexName = "flint_" + new FullyQualifiedTableName(mvName).toFlintName();
} else {
return null;
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@ void testManualRefreshMaterializedViewQuery() {
tags.put(JOB_TYPE_TAG_KEY, JobType.BATCH.getText());
String query =
"CREATE MATERIALIZED VIEW mv_1 AS select * from logs WITH" + " (auto_refresh = false)";
String sparkSubmitParameters = constructExpectedSparkSubmitParameterString(query);
String sparkSubmitParameters =
constructExpectedSparkSubmitParameterString(query, null, QUERY_ID);
StartJobRequest expected =
new StartJobRequest(
"TEST_CLUSTER:batch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void testShowIndex() {
assertNotNull(fullyQualifiedTableName);
assertEquals(FlintIndexType.COVERING, indexDetails.getIndexType());
assertEquals(IndexQueryActionType.SHOW, indexDetails.getIndexQueryActionType());
assertEquals("", indexDetails.openSearchIndexName());
assertNull(indexDetails.openSearchIndexName());
}

@Test
Expand All @@ -300,7 +300,7 @@ void testShowMaterializedView() {
assertNull(fullyQualifiedTableName);
assertEquals(FlintIndexType.MATERIALIZED_VIEW, indexDetails.getIndexType());
assertEquals(IndexQueryActionType.SHOW, indexDetails.getIndexQueryActionType());
assertEquals("", indexDetails.openSearchIndexName());
assertNull(indexDetails.openSearchIndexName());
}

@Test
Expand Down

0 comments on commit 6f44012

Please sign in to comment.