Skip to content
Merged
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
12 changes: 12 additions & 0 deletions plugin/trino-pinot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,18 @@
</exclusions>
</dependency>

<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-tpch</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.trino.tpch</groupId>
<artifactId>tpch</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>testing</artifactId>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public static DistributedQueryRunner createPinotQueryRunner(Map<String, String>
throws Exception
{
DistributedQueryRunner queryRunner = DistributedQueryRunner.builder(createSession("default"))
.setNodeCount(2)
.setExtraProperties(extraProperties)
.build();
queryRunner.installPlugin(new PinotPlugin(extension));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*/
package io.trino.plugin.pinot;

public class TestPinotWithoutAuthenticationIntegrationSmokeTest
extends AbstractPinotIntegrationSmokeTest
public class TestPinotWithoutAuthenticationIntegrationConnectorConnectorSmokeTest
extends BasePinotIntegrationConnectorSmokeTest
{
@Override
protected boolean isSecured()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

import static io.trino.plugin.pinot.TestingPinotCluster.PINOT_LATEST_IMAGE_NAME;

public class TestPinotWithoutAuthenticationIntegrationSmokeTestLatestVersion
extends AbstractPinotIntegrationSmokeTest
public class TestPinotWithoutAuthenticationIntegrationLatestVersionConnectorConnectorSmokeTest
extends BasePinotIntegrationConnectorSmokeTest
{
@Override
protected boolean isSecured()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

import static io.trino.plugin.pinot.TestingPinotCluster.PINOT_LATEST_IMAGE_NAME;

public class TestPinotWithoutAuthenticationIntegrationSmokeTestLatestVersionNoGrpc
extends AbstractPinotIntegrationSmokeTest
public class TestPinotWithoutAuthenticationIntegrationLatestVersionNoGrpcConnectorSmokeTest
extends BasePinotIntegrationConnectorSmokeTest
{
@Override
protected boolean isSecured()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import static io.trino.plugin.pinot.auth.PinotAuthenticationType.PASSWORD;

public class TestSecuredPinotIntegrationSmokeTest
extends AbstractPinotIntegrationSmokeTest
public class TestSecuredPinotIntegrationConnectorSmokeTest
extends BasePinotIntegrationConnectorSmokeTest
{
@Override
protected boolean isSecured()
Expand Down
46 changes: 46 additions & 0 deletions plugin/trino-pinot/src/test/resources/nation_realtimeSpec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"tableName": "nation",
"tableType": "REALTIME",
"segmentsConfig": {
"timeColumnName": "updated_at_seconds",
"retentionTimeUnit": "DAYS",
"retentionTimeValue": "365",
"segmentPushType": "APPEND",
"segmentPushFrequency": "daily",
"segmentAssignmentStrategy": "BalanceNumSegmentAssignmentStrategy",
"schemaName": "nation",
"replicasPerPartition": "1"
},
"tenants": {
"broker": "DefaultTenant",
"server": "DefaultTenant"
},
"tableIndexConfig": {
"loadMode": "MMAP",
"noDictionaryColumns": [],
"sortedColumn": [
"updated_at_seconds"
],
"aggregateMetrics": "false",
"nullHandlingEnabled": "true",
"streamConfigs": {
"streamType": "kafka",
"stream.kafka.consumer.type": "lowLevel",
"stream.kafka.topic.name": "nation",
"stream.kafka.decoder.class.name": "org.apache.pinot.plugin.inputformat.avro.confluent.KafkaConfluentSchemaRegistryAvroMessageDecoder",
"stream.kafka.consumer.factory.class.name": "org.apache.pinot.plugin.stream.kafka20.KafkaConsumerFactory",
"stream.kafka.decoder.prop.schema.registry.rest.url": "http://schema-registry:8081",
"stream.kafka.zk.broker.url": "zookeeper:2181/",
"stream.kafka.broker.list": "kafka:9092",
"realtime.segment.flush.threshold.time": "1m",
"realtime.segment.flush.threshold.size": "0",
"realtime.segment.flush.desired.size": "1M",
"isolation.level": "read_committed",
"stream.kafka.consumer.prop.auto.offset.reset": "smallest",
"stream.kafka.consumer.prop.group.id": "pinot_nation"
}
},
"metadata": {
"customConfigs": {}
}
}
31 changes: 31 additions & 0 deletions plugin/trino-pinot/src/test/resources/nation_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"schemaName": "nation",
"dimensionFieldSpecs": [
{
"name": "nationkey",
"dataType": "LONG"
},
{
"name": "name",
"dataType": "STRING"
},
{
"name": "comment",
"dataType": "STRING"
},
{
"name": "regionkey",
"dataType": "LONG"
}
],
"dateTimeFieldSpecs": [
{
"name": "updated_at_seconds",
"dataType": "LONG",
"defaultNullValue": 0,
"format": "1:SECONDS:EPOCH",
"transformFunction": "toEpochSeconds(updated_at)",
"granularity": "1:SECONDS"
}
]
}
46 changes: 46 additions & 0 deletions plugin/trino-pinot/src/test/resources/region_realtimeSpec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"tableName": "region",
"tableType": "REALTIME",
"segmentsConfig": {
"timeColumnName": "updated_at_seconds",
"retentionTimeUnit": "DAYS",
"retentionTimeValue": "365",
"segmentPushType": "APPEND",
"segmentPushFrequency": "daily",
"segmentAssignmentStrategy": "BalanceNumSegmentAssignmentStrategy",
"schemaName": "region",
"replicasPerPartition": "1"
},
"tenants": {
"broker": "DefaultTenant",
"server": "DefaultTenant"
},
"tableIndexConfig": {
"loadMode": "MMAP",
"noDictionaryColumns": [],
"sortedColumn": [
"updated_at_seconds"
],
"aggregateMetrics": "false",
"nullHandlingEnabled": "true",
"streamConfigs": {
"streamType": "kafka",
"stream.kafka.consumer.type": "lowLevel",
"stream.kafka.topic.name": "region",
"stream.kafka.decoder.class.name": "org.apache.pinot.plugin.inputformat.avro.confluent.KafkaConfluentSchemaRegistryAvroMessageDecoder",
"stream.kafka.consumer.factory.class.name": "org.apache.pinot.plugin.stream.kafka20.KafkaConsumerFactory",
"stream.kafka.decoder.prop.schema.registry.rest.url": "http://schema-registry:8081",
"stream.kafka.zk.broker.url": "zookeeper:2181/",
"stream.kafka.broker.list": "kafka:9092",
"realtime.segment.flush.threshold.time": "1m",
"realtime.segment.flush.threshold.size": "0",
"realtime.segment.flush.desired.size": "1M",
"isolation.level": "read_committed",
"stream.kafka.consumer.prop.auto.offset.reset": "smallest",
"stream.kafka.consumer.prop.group.id": "pinot_region"
}
},
"metadata": {
"customConfigs": {}
}
}
27 changes: 27 additions & 0 deletions plugin/trino-pinot/src/test/resources/region_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"schemaName": "region",
"dimensionFieldSpecs": [
{
"name": "regionkey",
"dataType": "LONG"
},
{
"name": "name",
"dataType": "STRING"
},
{
"name": "comment",
"dataType": "STRING"
}
],
"dateTimeFieldSpecs": [
{
"name": "updated_at_seconds",
"dataType": "LONG",
"defaultNullValue": 0,
"format": "1:SECONDS:EPOCH",
"transformFunction": "toEpochSeconds(updated_at)",
"granularity": "1:SECONDS"
}
]
}