Skip to content

Commit 2aca113

Browse files
committed
datasourceWithDefaultFormat
1 parent 2eceaa9 commit 2aca113

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

embedded-tests/src/test/java/org/apache/druid/testing/embedded/indexing/NestedDataFormatsTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ protected void ingestWithDefaultFormat() throws Exception
7575
{
7676
final TaskBuilder.IndexParallel indexTask =
7777
TaskBuilder.ofTypeIndexParallel()
78-
.dataSource(defaultFormat)
78+
.dataSource(datasourceWithDefaultFormat)
7979
.timestampColumn("timestamp")
8080
.jsonInputFormat()
8181
.inputSource(Resources.HttpData.kttm1Day())
8282
.schemaDiscovery();
8383

84-
final String taskId = EmbeddedClusterApis.newTaskId(defaultFormat);
84+
final String taskId = EmbeddedClusterApis.newTaskId(datasourceWithDefaultFormat);
8585
cluster.callApi().runTask(indexTask.withId(taskId), overlord);
86-
cluster.callApi().waitForAllSegmentsToBeAvailable(defaultFormat, coordinator, broker);
86+
cluster.callApi().waitForAllSegmentsToBeAvailable(datasourceWithDefaultFormat, coordinator, broker);
8787
}
8888

8989
@Test
@@ -114,7 +114,7 @@ public void test_objectStorageEncoding()
114114
}
115115
);
116116
Map<String, Object> defaultFormatResult =
117-
result.stream().filter(map -> defaultFormat.equals(map.get("datasource"))).findFirst().get();
117+
result.stream().filter(map -> datasourceWithDefaultFormat.equals(map.get("datasource"))).findFirst().get();
118118
Map<String, Object> noneObjectStorageFormatResult =
119119
result.stream().filter(map -> dataSource.equals(map.get("datasource"))).findFirst().get();
120120
// Test ingesting with skipping raw json smile format works, same row count, with ~20% storage saving
@@ -125,13 +125,13 @@ public void test_objectStorageEncoding()
125125

126126
// Test querying on a nested field works
127127
final String groupByQuery = "select json_value(event, '$.type') as event_type, count(*) as total from %s group by 1 order by 2 desc, 1 asc limit 10";
128-
final String queryResultDefaultFormat = cluster.callApi().runSql(groupByQuery, defaultFormat);
128+
final String queryResultDefaultFormat = cluster.callApi().runSql(groupByQuery, datasourceWithDefaultFormat);
129129
final String queryResultNoneObjectStorage = cluster.callApi().runSql(groupByQuery, dataSource);
130130
Assertions.assertEquals(queryResultDefaultFormat, queryResultNoneObjectStorage);
131131

132132
// Test reconstruct json column works, the ordering of the fields has changed, but all values are perserved.
133133
final String scanQuery = "select event, to_json_string(agent) as agent from %s where json_value(event, '$.type') = 'PercentClear' and json_value(agent, '$.os') = 'Android' order by __time asc limit 1";
134-
final String scanQueryResultDefaultFormat = cluster.callApi().runSql(scanQuery, defaultFormat);
134+
final String scanQueryResultDefaultFormat = cluster.callApi().runSql(scanQuery, datasourceWithDefaultFormat);
135135
final String scanQueryResultNoneObjectStorage = cluster.callApi().runSql(scanQuery, dataSource);
136136
// CHECKSTYLE: text blocks not supported in current Checkstyle version
137137
Assertions.assertEquals(

0 commit comments

Comments
 (0)