Skip to content

Commit

Permalink
Make sdk changes leaner
Browse files Browse the repository at this point in the history
- Remove superfluous SUPPORTS_FUNCTION_CALL_EXPRESSION_PUSHDOWN
- Remove all NONE enum types in pushdowns
- Remove all un-implemented pushdown subtypes
- Refactoring aggregate function and order by
- Reset all pom versions to match master
  • Loading branch information
Michael Hackett committed Apr 17, 2023
1 parent b27a611 commit 3c6a623
Show file tree
Hide file tree
Showing 134 changed files with 376 additions and 1,060 deletions.
4 changes: 2 additions & 2 deletions athena-arrow-java-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-athena-query-federation</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>athena-arrow-java-dist</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<packaging>pom</packaging>
<name>athena-arrow-java-dist</name>
<!-- Source: https://github.com/henrymai/arrow/commits/apache-arrow-10.0.1-amzn -->
Expand Down
4 changes: 2 additions & 2 deletions athena-aws-cmdb/athena-aws-cmdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Metadata:
Labels:
- athena-federation
HomePageUrl: 'https://github.com/awslabs/aws-athena-query-federation'
SemanticVersion: 2023.1.2-athena-test-SNAPSHOT
SemanticVersion: 2022.47.1
SourceCodeUrl: 'https://github.com/awslabs/aws-athena-query-federation'
Parameters:
AthenaCatalogName:
Expand Down Expand Up @@ -53,7 +53,7 @@ Resources:
spill_prefix: !Ref SpillPrefix
FunctionName: !Ref AthenaCatalogName
Handler: "com.amazonaws.athena.connectors.aws.cmdb.AwsCmdbCompositeHandler"
CodeUri: "./target/athena-aws-cmdb-2023.1.2-athena-test-SNAPSHOT.jar"
CodeUri: "./target/athena-aws-cmdb-2022.47.1.jar"
Description: "Enables Amazon Athena to communicate with various AWS Services, making your resource inventories accessible via SQL."
Runtime: java11
Timeout: !Ref LambdaTimeout
Expand Down
6 changes: 3 additions & 3 deletions athena-aws-cmdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<parent>
<artifactId>aws-athena-query-federation</artifactId>
<groupId>com.amazonaws</groupId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>athena-aws-cmdb</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-athena-federation-sdk</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<classifier>withdep</classifier>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public void doGetSplits()
new TableName("schema1", "table1"),
mockBlock,
Collections.emptyList(),
new Constraints(new HashMap<>(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(new HashMap<>(), Collections.emptyList(), Collections.emptyList(), -1),
null);

GetSplitsResponse response = handler.doGetSplits(blockAllocator, request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void readWithConstraint()
.withQueryId(UUID.randomUUID().toString())
.withIsDirectory(true)
.build(), keyFactory.create()).build(),
new Constraints(Collections.EMPTY_MAP, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(Collections.EMPTY_MAP, Collections.emptyList(), Collections.emptyList(), -1),
100_000,
100_000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public void readTableTest()
EquatableValueSet.newBuilder(allocator, Types.MinorType.VARCHAR.getType(), true, false)
.add(idValue).build());

Constraints constraints = new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1);
Constraints constraints = new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1);

ConstraintEvaluator evaluator = new ConstraintEvaluator(allocator, response.getSchema(), constraints);

Expand Down
4 changes: 2 additions & 2 deletions athena-cloudera-hive/athena-cloudera-hive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Metadata:
Labels:
- athena-federation
HomePageUrl: 'https://github.com/awslabs/aws-athena-query-federation'
SemanticVersion: 2023.1.2-athena-test-SNAPSHOT
SemanticVersion: 2022.47.1
SourceCodeUrl: 'https://github.com/awslabs/aws-athena-query-federation'
Parameters:
LambdaFunctionName:
Expand Down Expand Up @@ -66,7 +66,7 @@ Resources:
default: !Ref DefaultConnectionString
FunctionName: !Ref LambdaFunctionName
Handler: "com.amazonaws.athena.connectors.cloudera.HiveMuxCompositeHandler"
CodeUri: "./target/athena-cloudera-hive-2023.1.2-athena-test-SNAPSHOT.jar"
CodeUri: "./target/athena-cloudera-hive-2022.47.1.jar"
Description: "Enables Amazon Athena to communicate with Coludera Hive using JDBC"
Runtime: java11
Timeout: !Ref LambdaTimeout
Expand Down
10 changes: 5 additions & 5 deletions athena-cloudera-hive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
<parent>
<artifactId>aws-athena-query-federation</artifactId>
<groupId>com.amazonaws</groupId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>athena-cloudera-hive</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<properties>
<clouderaVersion>2.6.15.1018</clouderaVersion>
</properties>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>athena-federation-integ-test</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>athena-jdbc</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
</dependency>
<dependency>
<groupId>Hive</groupId>
Expand All @@ -31,7 +31,7 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>athena-jdbc</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions athena-cloudera-impala/athena-cloudera-impala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Metadata:
Labels:
- athena-federation
HomePageUrl: 'https://github.com/awslabs/aws-athena-query-federation'
SemanticVersion: 2023.1.2-athena-test-SNAPSHOT
SemanticVersion: 2022.47.1
SourceCodeUrl: 'https://github.com/awslabs/aws-athena-query-federation'
Parameters:
LambdaFunctionName:
Expand Down Expand Up @@ -71,7 +71,7 @@ Resources:
default: !Ref DefaultConnectionString
FunctionName: !Ref LambdaFunctionName
Handler: "com.amazonaws.athena.connectors.cloudera.ImpalaMuxCompositeHandler"
CodeUri: "./target/athena-cloudera-impala-2023.1.2-athena-test-SNAPSHOT.jar"
CodeUri: "./target/athena-cloudera-impala-2022.47.1.jar"
Description: "Enables Amazon Athena to communicate with Cloudera Impala using JDBC"
Runtime: java11
Timeout: !Ref LambdaTimeout
Expand Down
10 changes: 5 additions & 5 deletions athena-cloudera-impala/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
<parent>
<artifactId>aws-athena-query-federation</artifactId>
<groupId>com.amazonaws</groupId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>athena-cloudera-impala</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<properties>
<clouderaVersion>2.6.29.1035</clouderaVersion>
</properties>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>athena-federation-integ-test</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>athena-jdbc</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
</dependency>
<dependency>
<groupId>Impala</groupId>
Expand All @@ -31,7 +31,7 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>athena-jdbc</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions athena-cloudwatch-metrics/athena-cloudwatch-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Metadata:
Labels:
- athena-federation
HomePageUrl: 'https://github.com/awslabs/aws-athena-query-federation'
SemanticVersion: 2023.1.2-athena-test-SNAPSHOT
SemanticVersion: 2022.47.1
SourceCodeUrl: 'https://github.com/awslabs/aws-athena-query-federation'
Parameters:
AthenaCatalogName:
Expand Down Expand Up @@ -53,7 +53,7 @@ Resources:
spill_prefix: !Ref SpillPrefix
FunctionName: !Ref AthenaCatalogName
Handler: "com.amazonaws.athena.connectors.cloudwatch.metrics.MetricsCompositeHandler"
CodeUri: "./target/athena-cloudwatch-metrics-2023.1.2-athena-test-SNAPSHOT.jar"
CodeUri: "./target/athena-cloudwatch-metrics-2022.47.1.jar"
Description: "Enables Amazon Athena to communicate with Cloudwatch Metrics, making your metrics data accessible via SQL"
Runtime: java11
Timeout: !Ref LambdaTimeout
Expand Down
6 changes: 3 additions & 3 deletions athena-cloudwatch-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<parent>
<artifactId>aws-athena-query-federation</artifactId>
<groupId>com.amazonaws</groupId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>athena-cloudwatch-metrics</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-athena-federation-sdk</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<classifier>withdep</classifier>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void applyMetricConstraints()
constraintsMap.put(DIMENSION_NAME_FIELD, makeStringEquals(allocator, "match4"));
constraintsMap.put(DIMENSION_VALUE_FIELD, makeStringEquals(allocator, "match5"));

ConstraintEvaluator constraintEvaluator = new ConstraintEvaluator(allocator, schema, new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1));
ConstraintEvaluator constraintEvaluator = new ConstraintEvaluator(allocator, schema, new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1));

Metric metric = new Metric()
.withNamespace("match1")
Expand Down Expand Up @@ -139,7 +139,7 @@ public void pushDownPredicate()
constraintsMap.put(DIMENSION_VALUE_FIELD, makeStringEquals(allocator, "match5"));

ListMetricsRequest request = new ListMetricsRequest();
MetricUtils.pushDownPredicate(new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1), request);
MetricUtils.pushDownPredicate(new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1), request);

assertEquals("match1", request.getNamespace());
assertEquals("match2", request.getMetricName());
Expand Down Expand Up @@ -191,7 +191,7 @@ public void makeGetMetricDataRequest()
new TableName(schema, table),
schemaForRead,
split,
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1),
100_000_000_000L, //100GB don't expect this to spill
100_000_000_000L
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public void doGetTableLayout()
"queryId",
"default",
new TableName(defaultSchema, "metrics"),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1),
SchemaBuilder.newBuilder().build(),
Collections.EMPTY_SET);

Expand Down Expand Up @@ -230,7 +230,7 @@ public void doGetMetricsSplits()
new TableName(defaultSchema, "metrics"),
partitions,
Collections.singletonList("partitionId"),
new Constraints(new HashMap<>(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(new HashMap<>(), Collections.emptyList(), Collections.emptyList(), -1),
continuationToken);
int numContinuations = 0;
do {
Expand Down Expand Up @@ -304,7 +304,7 @@ public void doGetMetricSamplesSplits()
new TableName(defaultSchema, "metric_samples"),
partitions,
Collections.singletonList("partitionId"),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1),
continuationToken);

int numContinuations = 0;
Expand Down Expand Up @@ -371,7 +371,7 @@ public void doGetMetricSamplesSplitsEmptyMetrics()
new TableName(defaultSchema, "metric_samples"),
partitions,
Collections.singletonList("partitionId"),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1),
null);

GetSplitsRequest req = new GetSplitsRequest(originalReq, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public void readMetricsWithConstraint()
METRICS_TABLE_NAME,
METRIC_TABLE.getSchema(),
split,
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1),
100_000_000_000L,
100_000_000_000L//100GB don't expect this to spill
);
Expand Down Expand Up @@ -291,7 +291,7 @@ public void readMetricSamplesWithConstraint()
METRIC_SAMPLES_TABLE_NAME,
METRIC_DATA_TABLE.getSchema(),
split,
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1),
100_000_000_000L,
100_000_000_000L//100GB don't expect this to spill
);
Expand Down
4 changes: 2 additions & 2 deletions athena-cloudwatch/athena-cloudwatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Metadata:
Labels:
- athena-federation
HomePageUrl: 'https://github.com/awslabs/aws-athena-query-federation'
SemanticVersion: 2023.1.2-athena-test-SNAPSHOT
SemanticVersion: 2022.47.1
SourceCodeUrl: 'https://github.com/awslabs/aws-athena-query-federation'
Parameters:
AthenaCatalogName:
Expand Down Expand Up @@ -66,7 +66,7 @@ Resources:
kms_key_id: !If [HasKMSKeyId, !Ref KMSKeyId, !Ref "AWS::NoValue"]
FunctionName: !Ref AthenaCatalogName
Handler: "com.amazonaws.athena.connectors.cloudwatch.CloudwatchCompositeHandler"
CodeUri: "./target/athena-cloudwatch-2023.1.2-athena-test-SNAPSHOT.jar"
CodeUri: "./target/athena-cloudwatch-2022.47.1.jar"
Description: "Enables Amazon Athena to communicate with Cloudwatch, making your log accessible via SQL"
Runtime: java11
Timeout: !Ref LambdaTimeout
Expand Down
8 changes: 4 additions & 4 deletions athena-cloudwatch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
<parent>
<artifactId>aws-athena-query-federation</artifactId>
<groupId>com.amazonaws</groupId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>athena-cloudwatch</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-athena-federation-sdk</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<classifier>withdep</classifier>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>athena-federation-integ-test</artifactId>
<version>2023.2.1-athena-test</version>
<version>2022.47.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.awscdk/logs -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ else if (Integer.valueOf(request.getNextToken()) < 3) {
"queryId",
"default",
new TableName("schema-1", "all_log_streams"),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1),
schema,
Collections.singleton("log_stream"));

Expand Down Expand Up @@ -378,7 +378,7 @@ public void doGetSplits()
new TableName("schema", "all_log_streams"),
partitions,
Collections.singletonList(CloudwatchMetadataHandler.LOG_STREAM_FIELD),
new Constraints(new HashMap<>(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(new HashMap<>(), Collections.emptyList(), Collections.emptyList(), -1),
continuationToken);
int numContinuations = 0;
do {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public void doReadRecordsNoSpill()
.withIsDirectory(true)
.build(),
keyFactory.create()).add(CloudwatchMetadataHandler.LOG_STREAM_FIELD, "table").build(),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1),
100_000_000_000L,
100_000_000_000L//100GB don't expect this to spill
);
Expand Down Expand Up @@ -251,7 +251,7 @@ public void doReadRecordsSpill()
.withIsDirectory(true)
.build(),
keyFactory.create()).add(CloudwatchMetadataHandler.LOG_STREAM_FIELD, "table").build(),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), -1),
new Constraints(constraintsMap, Collections.emptyList(), Collections.emptyList(), -1),
1_500_000L, //~1.5MB so we should see some spill
0
);
Expand Down
Loading

0 comments on commit 3c6a623

Please sign in to comment.