Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions view-creator-framework/src/test/avro/TestView.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ protocol TestViewProtocol {
array<string> friends = [];
map<string> properties = {};
long time_taken_millis = 0;
boolean is_external = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void testCreatePinotSchema() {
LOGGER.info("Convert Pinot Schema from View: {}", pinotSchema);
assertEquals(viewCreationSpec.getViewName(), pinotSchema.getSchemaName());
// creation_time_millis not included in dimension columns
assertEquals(5, pinotSchema.getDimensionNames().size());
assertEquals(6, pinotSchema.getDimensionNames().size());
assertEquals(1, pinotSchema.getMetricFieldSpecs().size());
assertEquals(DataType.STRING, pinotSchema.getDimensionSpec("name").getDataType());
assertEquals(DataType.BYTES, pinotSchema.getDimensionSpec("id_sha").getDataType());
Expand Down Expand Up @@ -101,6 +101,7 @@ public void testCreatePinotSchema() {
new DateTimeFormatSpec(dateTimeFieldSpec.getFormat()).getColumnUnit());
assertEquals(DataType.LONG, dateTimeFieldSpec.getDataType());
assertEquals(0L, dateTimeFieldSpec.getDefaultNullValue());
assertEquals(DataType.BOOLEAN, pinotSchema.getDimensionSpec("is_external").getDataType());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So Pinot type for is_external avro field comes out to BOOLEAN now because of the new version of Pinot lib, and with older version it would have been converted to String type?

}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pinot = {
sortedColumn = "tenant_id"
timeColumn = creation_time_millis
timeUnit = MILLISECONDS
dimensionColumns = [name, creation_time_millis, id_sha, friends, properties__KEYS, properties__VALUES]
dimensionColumns = [name, creation_time_millis, id_sha, friends, properties__KEYS, properties__VALUES, is_external]
dateTimeColumns = [start_time_millis, end_time_millis, bucket_start_time_millis]
columnsMaxLength = {id_sha: 64}
metricColumns = [time_taken_millis]
Expand Down