diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 17b6e84aaf0..1d8bf9d2449 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -200,7 +200,7 @@ jobs:
env:
MAVEN_OPTS: "-Xmx1g"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
- AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
mvn -B -e surefire:test -pl ${{ steps.modulesToInclude.outputs.INCLUSION_MODULES }} ${{ needs.build.outputs.profiles }} -T2 -DargLine="-Xmx6g" -Dsurefire.reports.directory=${GITHUB_WORKSPACE}/surefire-reports-aggregate
@@ -270,4 +270,4 @@ jobs:
working-directory: legend-docs
run: |
git commit -m "maint: update legend-engine docs from ref: ${{ github.sha }}"
- git push
+ git push
\ No newline at end of file
diff --git a/.run/Maven clean install all Relational PCT Modules.run.xml b/.run/Maven clean install all Relational PCT Modules.run.xml
index 44afb35c3d7..ab71b55a5ca 100644
--- a/.run/Maven clean install all Relational PCT Modules.run.xml
+++ b/.run/Maven clean install all Relational PCT Modules.run.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/legend-engine-config/legend-engine-extensions-collection-generation/src/test/java/org/finos/legend/engine/extensions/collection/generation/TestExtensions.java b/legend-engine-config/legend-engine-extensions-collection-generation/src/test/java/org/finos/legend/engine/extensions/collection/generation/TestExtensions.java
index dd63505fe8f..dd9ff480685 100644
--- a/legend-engine-config/legend-engine-extensions-collection-generation/src/test/java/org/finos/legend/engine/extensions/collection/generation/TestExtensions.java
+++ b/legend-engine-config/legend-engine-extensions-collection-generation/src/test/java/org/finos/legend/engine/extensions/collection/generation/TestExtensions.java
@@ -651,6 +651,7 @@ protected Iterable getExpectedCodeRepositories()
.with("core_persistence_relational")
.with("core_dataquality")
.with("core_relational")
+ .with("core_relational_athena")
.with("core_relational_bigquery")
.with("core_relational_spanner")
.with("core_relational_trino")
diff --git a/legend-engine-config/legend-engine-repl/legend-engine-repl-relational/pom.xml b/legend-engine-config/legend-engine-repl/legend-engine-repl-relational/pom.xml
index 0fe4c6689e8..a33c498aa26 100644
--- a/legend-engine-config/legend-engine-repl/legend-engine-repl-relational/pom.xml
+++ b/legend-engine-config/legend-engine-repl/legend-engine-repl-relational/pom.xml
@@ -102,6 +102,11 @@
legend-engine-xt-relationalStore-snowflake-PCTruntime
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-PCT
+ runtime
+ org.finos.legend.enginelegend-engine-xt-relationalStore-memsql-PCT
diff --git a/legend-engine-config/legend-engine-server/legend-engine-server-http-server/pom.xml b/legend-engine-config/legend-engine-server/legend-engine-server-http-server/pom.xml
index 48c5476ef21..65824ea3561 100644
--- a/legend-engine-config/legend-engine-server/legend-engine-server-http-server/pom.xml
+++ b/legend-engine-config/legend-engine-server/legend-engine-server-http-server/pom.xml
@@ -91,6 +91,23 @@
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ dependency-analyze
+
+
+ org.slf4j:slf4j-api
+
+
+ com.amazon.athena:AthenaJDBC42
+
+
+
+
+
@@ -1183,6 +1200,11 @@
legend-engine-xt-relationalStore-snowflake-PCTruntime
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-PCT
+ runtime
+ org.finos.legend.enginelegend-engine-xt-relationalStore-databricks-PCT
diff --git a/legend-engine-core/legend-engine-core-pure/legend-engine-pure-ide/legend-engine-pure-ide-light-http-server/pom.xml b/legend-engine-core/legend-engine-core-pure/legend-engine-pure-ide/legend-engine-pure-ide-light-http-server/pom.xml
index 121a3359f3a..da9f02b32fa 100644
--- a/legend-engine-core/legend-engine-core-pure/legend-engine-pure-ide/legend-engine-pure-ide-light-http-server/pom.xml
+++ b/legend-engine-core/legend-engine-core-pure/legend-engine-pure-ide/legend-engine-pure-ide-light-http-server/pom.xml
@@ -180,6 +180,12 @@
runtime
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-PCT
+ runtime
+
+
org.finos.legend.enginelegend-engine-xt-relationalStore-memsql-PCT
diff --git a/legend-engine-core/legend-engine-core-pure/legend-engine-pure-ide/legend-engine-pure-ide-light-http-server/src/main/java/org/finos/legend/engine/ide/PureIDELight.java b/legend-engine-core/legend-engine-core-pure/legend-engine-pure-ide/legend-engine-pure-ide-light-http-server/src/main/java/org/finos/legend/engine/ide/PureIDELight.java
index e10f97a7768..36167537052 100644
--- a/legend-engine-core/legend-engine-core-pure/legend-engine-pure-ide/legend-engine-pure-ide-light-http-server/src/main/java/org/finos/legend/engine/ide/PureIDELight.java
+++ b/legend-engine-core/legend-engine-core-pure/legend-engine-pure-ide/legend-engine-pure-ide-light-http-server/src/main/java/org/finos/legend/engine/ide/PureIDELight.java
@@ -159,7 +159,9 @@ protected MutableList buildRepositories(SourceLocationCon
.with(this.buildCore("legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-postgres/legend-engine-xt-relationalStore-postgres-PCT", "relational-postgres-pct"))
.with(this.buildCore("legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-duckdb/legend-engine-xt-relationalStore-duckdb-PCT", "relational-duckdb-pct"))
.with(this.buildCore("legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-h2/legend-engine-xt-relationalStore-h2-PCT", "relational-h2-pct"))
+ .with(this.buildCore("legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT", "relational-athena-pct"))
.with(this.buildCore("legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-memsql/legend-engine-xt-relationalStore-memsql-sqlDialectTranslation-pure", "external-store-relational-sql-dialect-translation-memsql"))
+ .with(this.buildCore("legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure", "external-store-relational-sql-dialect-translation-athena"))
;
}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-PCT/legend-engine-pure-functions-relationalStore-PCT-pure/src/main/resources/core_external_test_connection/pct_relational.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-PCT/legend-engine-pure-functions-relationalStore-PCT-pure/src/main/resources/core_external_test_connection/pct_relational.pure
index 6a5068f763a..3b62cf7e648 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-PCT/legend-engine-pure-functions-relationalStore-PCT-pure/src/main/resources/core_external_test_connection/pct_relational.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-PCT/legend-engine-pure-functions-relationalStore-PCT-pure/src/main/resources/core_external_test_connection/pct_relational.pure
@@ -863,7 +863,7 @@ function meta::relational::tests::pct::process::buildJoins(class:Class[1],
let targetType = $p->functionReturnType().rawType->toOne();
let target = $classTableMappings->filter(ctm|$ctm.class == $targetType)->toOne();
let srcColumn = $src.table.columns->cast(@Column)->filter(c|$c.name == '_pureId')->toOne();
- let fkColumn = ^Column(name='_'+$class.name->toOne()+'_'+$p.name->toOne(), type=^meta::relational::metamodel::datatype::Integer());
+ let fkColumn = ^Column(name=$class.name->toOne()+'_'+$p.name->toOne() + '_', type=^meta::relational::metamodel::datatype::Integer());
let targetTable = $target.table;
$targetTable->mutateAdd('columns', $fkColumn);
let srcAlias = ^TableAlias(database=$db, name='src', relationalElement=$src.table);
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/pom.xml b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/pom.xml
new file mode 100644
index 00000000000..ccfefa23b88
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/pom.xml
@@ -0,0 +1,423 @@
+
+
+
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena
+ 4.101.3-SNAPSHOT
+
+ 4.0.0
+
+ legend-engine-xt-relationalStore-athena-PCT
+ jar
+ Legend Engine - XT - Relational Store - Athena - PCT
+
+
+
+
+ org.finos.legend.pure
+ legend-pure-maven-generation-par
+
+ ${project.basedir}/src/main/resources
+ ${legend.pure.version}
+
+ core_relational_athena_pct
+
+
+ ${project.basedir}/src/main/resources/core_relational_athena_pct.definition.json
+
+
+
+
+ generate-sources
+
+ build-pure-jar
+
+
+
+
+
+ org.finos.legend.engine
+ legend-engine-pure-code-compiled-core
+ ${project.version}
+
+
+ org.finos.legend.pure
+ legend-pure-m2-dsl-diagram-grammar
+ ${legend.pure.version}
+
+
+ org.finos.legend.engine
+ legend-engine-pure-functions-legendCompiler-pure
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-core-pure
+ ${project.version}
+
+
+ org.finos.legend.pure
+ legend-pure-m2-store-relational-grammar
+ ${legend.pure.version}
+
+
+ org.finos.legend.engine
+ legend-engine-pure-functions-relationalStore-PCT-pure
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure
+ ${project.version}
+
+
+
+
+ org.finos.legend.pure
+ legend-pure-maven-generation-java
+
+
+ compile
+
+ build-pure-compiled-jar
+
+
+ true
+ true
+ modular
+ true
+
+ core_relational_athena_pct
+
+
+
+
+
+
+ org.finos.legend.engine
+ legend-engine-pure-code-compiled-core
+ ${project.version}
+
+
+ org.finos.legend.pure
+ legend-pure-m2-dsl-diagram-grammar
+ ${legend.pure.version}
+
+
+ org.finos.legend.engine
+ legend-engine-pure-functions-legendCompiler-pure
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-core-pure
+ ${project.version}
+
+
+ org.finos.legend.pure
+ legend-pure-m2-store-relational-grammar
+ ${legend.pure.version}
+
+
+ org.finos.legend.engine
+ legend-engine-pure-functions-relationalStore-PCT-pure
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-pure-runtime-java-extension-compiled-functions-relationalStore-PCT
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure
+ ${project.version}
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ true
+
+
+
+
+
+
+
+ pct-cloud-test
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ false
+ 4
+ false
+
+ ${env.AWS_ACCESS_KEY_ID}
+ ${env.AWS_SECRET_ACCESS_KEY}
+ ${env.PCT_EXTERNAL_RESOURCES_PROPERTIES}
+
+
+
+
+ org.finos.legend.pure
+ legend-pure-maven-generation-pct
+
+ Compiled
+ ${project.build.directory}/classes/pct-reports/
+
+
+ org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct.Test_Relational_Athena_StandardFunctions_PCT
+
+
+ org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct.Test_Relational_Athena_EssentialFunctions_PCT
+
+
+ org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct.Test_Relational_Athena_GrammarFunctions_PCT
+
+
+ org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct.Test_Relational_Athena_RelationFunctions_PCT
+
+
+ org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct.Test_Relational_Athena_UnclassifiedFunctions_PCT
+
+
+ org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct.Test_Relational_Athena_VariantFunctions_PCT
+
+
+
+
+
+ PCT-Generation
+ process-test-classes
+
+ generate-pct-report
+
+
+
+
+
+ org.finos.legend.engine
+ legend-engine-pure-platform-java
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-pure-functions-standard-pure
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-pure-functions-relation-pure
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-pure-platform-dsl-tds-java
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-pure-runtime-java-extension-compiled-functions-relation
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-pure-runtime-java-extension-compiled-functions-relationalStore-PCT
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure
+ ${project.version}
+
+
+
+
+
+
+
+
+
+
+ org.eclipse.collections
+ eclipse-collections
+
+
+ org.eclipse.collections
+ eclipse-collections-api
+
+
+
+ org.finos.legend.engine
+ legend-engine-shared-vault-core
+
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-protocol
+
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure
+
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-executionPlan-connection
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-protocol
+
+
+
+ org.finos.legend.engine
+ legend-engine-test-framework
+
+
+
+ org.finos.legend.engine
+ legend-engine-pure-functions-standard-pure
+
+
+ org.finos.legend.engine
+ legend-engine-pure-functions-relation-pure
+
+
+ org.finos.legend.engine
+ legend-engine-pure-functions-unclassified-pure
+
+
+
+ org.finos.legend.engine
+ legend-engine-pure-runtime-java-extension-compiled-functions-relationalStore-PCT
+
+
+ org.finos.legend.pure
+ legend-pure-m3-core
+
+
+ org.finos.legend.pure
+ legend-pure-runtime-java-engine-compiled
+
+
+ org.finos.legend.engine
+ legend-engine-pure-platform-java
+
+
+ org.finos.legend.engine
+ legend-engine-pure-functions-relationalStore-PCT-pure
+ runtime
+
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-grammar
+ runtime
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-execution
+ runtime
+
+
+
+ org.apache.commons
+ commons-lang3
+
+
+
+
+ junit
+ junit
+ test
+
+
+ org.finos.legend.pure
+ legend-pure-m4
+
+
+ org.finos.legend.engine
+ legend-engine-pure-platform-dsl-tds-java
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-pure-runtime-java-extension-compiled-functions-relation
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-javaPlatformBinding-pure
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-pure-functions-planExecution-pure
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-pure-runtime-java-extension-compiled-functions-planExecution
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-pure-runtime-java-extension-shared-functions-planExecution
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-pure-runtime-java-extension-compiled-functions-pureExtensions
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-core-pure
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-executionPlan
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-external-format-grammar
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-external-format-compiler
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-xt-json-model
+ test
+
+
+
+
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/integration/AthenaTestConnectionIntegration.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/integration/AthenaTestConnectionIntegration.java
new file mode 100644
index 00000000000..865cad23faf
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/integration/AthenaTestConnectionIntegration.java
@@ -0,0 +1,155 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.engine.plan.execution.stores.relational.test.athena.integration;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UncheckedIOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Properties;
+import org.apache.commons.lang3.StringUtils;
+import org.eclipse.collections.api.list.MutableList;
+import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.TestConnectionIntegration;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.RelationalDatabaseConnection;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.specification.AthenaDatasourceSpecification;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.authentication.UserNamePasswordAuthenticationStrategy;
+import org.finos.legend.engine.shared.core.vault.EnvironmentVaultImplementation;
+import org.finos.legend.engine.shared.core.vault.PropertiesVaultImplementation;
+import org.finos.legend.engine.shared.core.vault.Vault;
+import org.finos.legend.engine.test.shared.framework.TestServerResource;
+
+
+public class AthenaTestConnectionIntegration implements TestConnectionIntegration, TestServerResource
+{
+ private final RelationalDatabaseConnection conn = new RelationalDatabaseConnection();
+
+ @Override
+ public MutableList group()
+ {
+ return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Athena");
+ }
+
+ @Override
+ public DatabaseType getDatabaseType()
+ {
+ return DatabaseType.Athena;
+ }
+
+ @Override
+ public void setup()
+ {
+ AthenaDatasourceSpecification athenaDatasourceSpecification = new AthenaDatasourceSpecification();
+ UserNamePasswordAuthenticationStrategy authSpec = new UserNamePasswordAuthenticationStrategy();
+
+ String pctProperties = System.getProperty("pct.external.resources.properties", System.getenv("PCT_EXTERNAL_RESOURCES_PROPERTIES"));
+ Path localPctProperties = Paths.get(pctProperties != null ? pctProperties : "");
+
+ String awsAccessKeyIdFromEnv = System.getenv("AWS_ACCESS_KEY_ID");
+ String awsSecretAccessKeyFromEnv = System.getenv("AWS_SECRET_ACCESS_KEY");
+
+ String awsAccessKeyIdFromProps = System.getProperty("AWS_ACCESS_KEY_ID");
+ String awsSecretAccessKeyFromProps = System.getProperty("AWS_SECRET_ACCESS_KEY");
+
+ if (!Files.isDirectory(localPctProperties) && Files.isReadable(localPctProperties))
+ {
+ try (InputStream is = Files.newInputStream(localPctProperties))
+ {
+ Properties properties = new Properties();
+ properties.load(is);
+
+ Vault.INSTANCE.registerImplementation(new PropertiesVaultImplementation(properties));
+
+ athenaDatasourceSpecification.databaseName = properties.getProperty("athena.spec.databaseName");
+ athenaDatasourceSpecification.awsRegion = properties.getProperty("athena.spec.region");
+ athenaDatasourceSpecification.workgroup = properties.getProperty("athena.spec.workgroup");
+ athenaDatasourceSpecification.s3OutputLocation = properties.getProperty("athena.spec.s3OutputLocation");
+
+ authSpec.userNameVaultReference = "athena.auth.userName";
+ authSpec.passwordVaultReference = "athena.auth.password";
+ }
+ catch (IOException e)
+ {
+ throw new UncheckedIOException(e);
+ }
+ }
+ else if (!StringUtils.isEmpty(awsAccessKeyIdFromProps) && !StringUtils.isEmpty(awsSecretAccessKeyFromProps))
+ {
+ Properties properties = new Properties();
+ properties.put("AWS_ACCESS_KEY_ID", awsAccessKeyIdFromProps);
+ properties.put("AWS_SECRET_ACCESS_KEY", awsSecretAccessKeyFromProps);
+
+ Vault.INSTANCE.registerImplementation(new PropertiesVaultImplementation(properties));
+
+ athenaDatasourceSpecification.databaseName = "default";
+ athenaDatasourceSpecification.awsRegion = "us-east-2";
+ athenaDatasourceSpecification.s3OutputLocation = "s3://legend-athena-query-results/";
+
+ authSpec.userNameVaultReference = "AWS_ACCESS_KEY_ID";
+ authSpec.passwordVaultReference = "AWS_SECRET_ACCESS_KEY";
+ }
+ else if (!StringUtils.isEmpty(awsAccessKeyIdFromEnv) && !StringUtils.isEmpty(awsSecretAccessKeyFromEnv))
+ {
+ Vault.INSTANCE.registerImplementation(new EnvironmentVaultImplementation());
+
+ athenaDatasourceSpecification.databaseName = "default";
+ athenaDatasourceSpecification.awsRegion = "us-east-2";
+ athenaDatasourceSpecification.s3OutputLocation = "s3://legend-athena-query-results/";
+
+ authSpec.userNameVaultReference = "AWS_ACCESS_KEY_ID";
+ authSpec.passwordVaultReference = "AWS_SECRET_ACCESS_KEY";
+ }
+ else
+ {
+ throw new IllegalStateException("Cannot initialize Athena integration connection");
+ }
+
+ conn.type = DatabaseType.Athena;
+ conn.databaseType = DatabaseType.Athena;
+ conn.element = null;
+ conn.datasourceSpecification = athenaDatasourceSpecification;
+ conn.authenticationStrategy = authSpec;
+ }
+
+ @Override
+ public RelationalDatabaseConnection getConnection()
+ {
+ if (conn.datasourceSpecification == null)
+ {
+ this.setup();
+ }
+ return this.conn;
+ }
+
+ @Override
+ public void cleanup()
+ {
+ }
+
+
+ @Override
+ public void start() throws Exception
+ {
+ this.setup();
+ }
+
+ @Override
+ public void shutDown() throws Exception
+ {
+ this.cleanup();
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/integration/Core_Relational_Athena_PCTReportProvider.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/integration/Core_Relational_Athena_PCTReportProvider.java
new file mode 100644
index 00000000000..3ea01fd4cbf
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/integration/Core_Relational_Athena_PCTReportProvider.java
@@ -0,0 +1,44 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.engine.plan.execution.stores.relational.test.athena.integration;
+
+import org.eclipse.collections.api.factory.Lists;
+import org.eclipse.collections.api.list.MutableList;
+import org.finos.legend.pure.m3.pct.functions.model.Functions;
+import org.finos.legend.pure.m3.pct.reports.model.AdapterReport;
+import org.finos.legend.pure.m3.pct.shared.provider.PCTReportProvider;
+import org.finos.legend.pure.m3.pct.shared.provider.PCTReportProviderTool;
+
+public class Core_Relational_Athena_PCTReportProvider implements PCTReportProvider
+{
+ @Override
+ public MutableList getFunctions()
+ {
+ return Lists.mutable.empty();
+ }
+
+ @Override
+ public MutableList getAdapterReports()
+ {
+ return PCTReportProviderTool.load(Core_Relational_Athena_PCTReportProvider.class.getClassLoader(), AdapterReport.class,
+ "pct-reports/ADAPTER_standard_compiled_Athena.json",
+ "pct-reports/ADAPTER_essential_compiled_Athena.json",
+ "pct-reports/ADAPTER_grammar_compiled_Athena.json",
+ "pct-reports/ADAPTER_relation_compiled_Athena.json",
+ "pct-reports/ADAPTER_unclassified_compiled_Athena.json",
+ "pct-reports/ADAPTER_variant_compiled_Athena.json"
+ );
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/java/org/finos/legend/pure/code/core/CoreRelationalAthenaPCTCodeRepositoryProvider.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/java/org/finos/legend/pure/code/core/CoreRelationalAthenaPCTCodeRepositoryProvider.java
new file mode 100644
index 00000000000..f9ea60236be
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/java/org/finos/legend/pure/code/core/CoreRelationalAthenaPCTCodeRepositoryProvider.java
@@ -0,0 +1,35 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.pure.code.core;
+
+import org.finos.legend.pure.m3.pct.reports.model.Adapter;
+import org.finos.legend.pure.m3.serialization.filesystem.repository.CodeRepository;
+import org.finos.legend.pure.m3.serialization.filesystem.repository.CodeRepositoryProvider;
+import org.finos.legend.pure.m3.serialization.filesystem.repository.GenericCodeRepository;
+
+public class CoreRelationalAthenaPCTCodeRepositoryProvider implements CodeRepositoryProvider
+{
+ public static final Adapter athenaAdapter = new Adapter(
+ "Athena",
+ "Store_Relational",
+ "meta::relational::tests::pct::athena::testAdapterForRelationalWithAthenaExecution_Function_1__X_o_"
+ );
+
+ @Override
+ public CodeRepository repository()
+ {
+ return GenericCodeRepository.build("core_relational_athena_pct.definition.json");
+ }
+}
\ No newline at end of file
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/META-INF/services/org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.TestConnectionIntegration b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/META-INF/services/org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.TestConnectionIntegration
new file mode 100644
index 00000000000..c1a242ebd05
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/META-INF/services/org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.TestConnectionIntegration
@@ -0,0 +1 @@
+org.finos.legend.engine.plan.execution.stores.relational.test.athena.integration.AthenaTestConnectionIntegration
\ No newline at end of file
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/META-INF/services/org.finos.legend.pure.m3.pct.shared.provider.PCTReportProvider b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/META-INF/services/org.finos.legend.pure.m3.pct.shared.provider.PCTReportProvider
new file mode 100644
index 00000000000..6e3ea54b9bc
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/META-INF/services/org.finos.legend.pure.m3.pct.shared.provider.PCTReportProvider
@@ -0,0 +1 @@
+org.finos.legend.engine.plan.execution.stores.relational.test.athena.integration.Core_Relational_Athena_PCTReportProvider
\ No newline at end of file
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/META-INF/services/org.finos.legend.pure.m3.serialization.filesystem.repository.CodeRepositoryProvider b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/META-INF/services/org.finos.legend.pure.m3.serialization.filesystem.repository.CodeRepositoryProvider
new file mode 100644
index 00000000000..bd91a9b5a93
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/META-INF/services/org.finos.legend.pure.m3.serialization.filesystem.repository.CodeRepositoryProvider
@@ -0,0 +1 @@
+org.finos.legend.pure.code.core.CoreRelationalAthenaPCTCodeRepositoryProvider
\ No newline at end of file
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/core_relational_athena_pct.definition.json b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/core_relational_athena_pct.definition.json
new file mode 100644
index 00000000000..8bb671ff883
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/core_relational_athena_pct.definition.json
@@ -0,0 +1,16 @@
+{
+ "name": "core_relational_athena_pct",
+ "pattern": "(meta::relational::tests::pct::athena)(::.*)?",
+ "dependencies": [
+ "platform",
+ "platform_dsl_store",
+ "platform_store_relational",
+ "core",
+ "core_functions_unclassified",
+ "core_functions_standard",
+ "core_external_compiler",
+ "core_relational",
+ "core_external_test_connection",
+ "core_external_store_relational_sql_dialect_translation_athena"
+ ]
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/core_relational_athena_pct/pct_adapter.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/core_relational_athena_pct/pct_adapter.pure
new file mode 100644
index 00000000000..20451612b90
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/main/resources/core_relational_athena_pct/pct_adapter.pure
@@ -0,0 +1,28 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import meta::relational::extension::*;
+import meta::pure::extension::*;
+import meta::relational::tests::pct::*;
+import meta::pure::test::pct::*;
+import meta::relational::runtime::*;
+
+function <> {PCT.adapterName='Athena'} meta::relational::tests::pct::athena::testAdapterForRelationalWithAthenaExecution(f:Function<{->X[o]}>[1]):X[o]
+{
+ meta::relational::tests::pct::testAdapterForRelationalExecution(
+ $f,
+ meta::pure::testConnection::getTestConnection(DatabaseType.Athena),
+ relationalExtensions()->concatenate(meta::external::store::relational::sqlDialectTranslation::athena::athenaSqlDialectExtension())
+ )
+}
\ No newline at end of file
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/TestPCTReportAthena.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/TestPCTReportAthena.java
new file mode 100644
index 00000000000..e4a2bbe2c2f
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/TestPCTReportAthena.java
@@ -0,0 +1,32 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct;
+
+import org.eclipse.collections.api.factory.Sets;
+import org.finos.legend.pure.m3.pct.shared.provider.PCTReportProviderLoader;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestPCTReportAthena
+{
+ @Test
+ public void canFindPCTReport()
+ {
+ Assert.assertEquals(
+ Sets.mutable.with("essential", "grammar", "standard", "relation", "unclassified", "variant"),
+ PCTReportProviderLoader.gatherReports().select(x -> x.adapterKey.adapter.name.equals("Athena")).collect(x -> x.reportScope.module).toSet()
+ );
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_EssentialFunctions_PCT.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_EssentialFunctions_PCT.java
new file mode 100644
index 00000000000..de0c3245729
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_EssentialFunctions_PCT.java
@@ -0,0 +1,373 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct;
+
+import junit.framework.Test;
+import org.eclipse.collections.api.factory.Lists;
+import org.eclipse.collections.api.list.MutableList;
+import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.TestConnectionIntegrationLoader;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType;
+import org.finos.legend.engine.test.shared.framework.TestServerResource;
+import org.finos.legend.pure.code.core.CoreRelationalAthenaPCTCodeRepositoryProvider;
+import org.finos.legend.pure.m3.PlatformCodeRepositoryProvider;
+import org.finos.legend.pure.m3.pct.reports.config.PCTReportConfiguration;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.AdapterQualifier;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.ExclusionSpecification;
+import org.finos.legend.pure.m3.pct.reports.model.Adapter;
+import org.finos.legend.pure.m3.pct.shared.model.ReportScope;
+import org.finos.legend.pure.runtime.java.compiled.testHelper.PureTestBuilderCompiled;
+
+import static org.finos.legend.engine.test.shared.framework.PureTestHelperFramework.wrapSuite;
+
+public class Test_Relational_Athena_EssentialFunctions_PCT extends PCTReportConfiguration
+{
+ private static final ReportScope reportScope = PlatformCodeRepositoryProvider.essentialFunctions;
+ private static final Adapter adapter = CoreRelationalAthenaPCTCodeRepositoryProvider.athenaAdapter;
+ private static final String platform = "compiled";
+ private static final MutableList expectedFailures = Lists.mutable.with(
+ // Add
+ one("meta::pure::functions::collection::tests::add::testAddWithOffset_Function_1__Boolean_1_", "No SQL translation exists for the PURE function 'add_T_MANY__Integer_1__T_1__T_$1_MANY$_'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::add::testAdd_Function_1__Boolean_1_", "Couldn't find DynaFunction to Postgres model translation for toVariantList().", AdapterQualifier.needsImplementation),
+
+ // At
+ one("meta::pure::functions::collection::tests::at::testAtOtherScenario_Function_1__Boolean_1_", "\"->at(...) function is supported only after direct access of 1->MANY properties. Current expression: ['a', 'b', 'c'] -> map(x:String[1] | [$x, 'z'] -> plus();) -> at(0)\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::at::testAtWithVariable_Function_1__Boolean_1_", "\"->at(...) function is supported only after direct access of 1->MANY properties. Current expression: ['a', 'b', 'c'] -> at(1)\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::at::testAt_Function_1__Boolean_1_", "\"->at(...) function is supported only after direct access of 1->MANY properties. Current expression: ['a', 'b', 'c'] -> at(0)\"", AdapterQualifier.unsupportedFeature),
+
+ // Concatenate
+ one("meta::pure::functions::collection::tests::concatenate::testConcatenateMixedType_Function_1__Boolean_1_", "\"Cannot cast a collection of size 3 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::concatenate::testConcatenateSimple_Function_1__Boolean_1_", "\"Cannot cast a collection of size 3 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::concatenate::testConcatenateTypeInference_Function_1__Boolean_1_", "\"Cannot cast a collection of size 3 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+
+ // Contains
+ one("meta::pure::functions::collection::tests::contains::testContainsNonPrimitive_Function_1__Boolean_1_", "\"Parameter to IN operation isn't a literal!\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::contains::testContainsPrimitive_Function_1__Boolean_1_", "TYPE_MISMATCH: line 1:26: IN value and list items must be the same type or coercible to a common type. Cannot find common type between integer and varchar(1), all types (without duplicates): [integer, varchar(1), boolean, date]", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::contains::testContainsWithFunction_Function_1__Boolean_1_", "no viable alternative at input '->meta::pure::functions::collection::contains(meta::pure::functions::collection::tests::contains::ClassWithoutEquality.all()->meta::pure::functions::multiplicity::toOne(),comparator(a:meta::pure::functions::collection::tests::contains::ClassWithoutEquality[1],'", AdapterQualifier.unsupportedFeature),
+
+ // Drop
+ one("meta::pure::functions::collection::tests::drop::testDropExceedsSizeOnNonEmptyList_Function_1__Boolean_1_", "Variant ->drop() not supported yet", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::drop::testDropInList_Function_1__Boolean_1_", "Variant ->drop() not supported yet", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::drop::testDropManyOnNonEmptyList_Function_1__Boolean_1_", "Variant ->drop() not supported yet", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::drop::testDropNegativeOnEmptyList_Function_1__Boolean_1_", "\"Invalid type for parameter inside the drop function. Expected a value, found operation/function\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::drop::testDropNegativeOnNonEmptyList_Function_1__Boolean_1_", "Variant ->drop() not supported yet", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::drop::testDropOneOnNonEmptyList_Function_1__Boolean_1_", "Variant ->drop() not supported yet", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::drop::testDropZeroOnNonEmptyList_Function_1__Boolean_1_", "Variant ->drop() not supported yet", AdapterQualifier.needsInvestigation),
+
+ // Exists
+ one("meta::pure::functions::collection::tests::exists::testExists_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+
+ // Find
+ one("meta::pure::functions::collection::tests::find::testFindInstance_Function_1__Boolean_1_", "Error dynamically evaluating value specification (from /platform/pure/essential/collection/iteration/find.pure:38cc38-42); error compiling generated Java code:", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::find::testFindLiteralFromVar_Function_1__Boolean_1_", "Function does not exist 'meta::pure::functions::collection::find(String[3],LambdaFunction<{String[1]->Boolean[1]}>[1])'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::find::testFindLiteral_Function_1__Boolean_1_", "Function does not exist 'meta::pure::functions::collection::find(String[4],LambdaFunction<{String[1]->Boolean[1]}>[1])'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::find::testFindUsingVarForFunction_Function_1__Boolean_1_", "Error dynamically evaluating value specification (from /platform/pure/essential/collection/iteration/find.pure:47cc38-42); error compiling generated Java code:", AdapterQualifier.needsInvestigation),
+
+ // Fold
+ one("meta::pure::functions::collection::tests::fold::testFoldCollectionAccumulator_Function_1__Boolean_1_", "Match failure: FoldRelationalLambdaObject instanceOf FoldRelationalLambda", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::fold::testFoldEmptyListAndEmptyIdentity_Function_1__Boolean_1_", "No SQL translation exists for the PURE function 'fold_T_MANY__Function_1__V_m__V_m_'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::fold::testFoldEmptyListAndNonEmptyIdentity_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'fold_T_MANY__Function_1__V_m__V_m_'.", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::fold::testFoldFiltering_Function_1__Boolean_1_", "Function does not exist 'meta::pure::functions::lang::copy(FO_Person[1],String[1],KeyExpression[1])'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::fold::testFoldMixedAccumulatorTypes_Function_1__Boolean_1_", "Match failure: FoldRelationalLambdaObject instanceOf FoldRelationalLambda", AdapterQualifier.needsImplementation),
+ one("meta::pure::functions::collection::tests::fold::testFoldToMany_Function_1__Boolean_1_", "Function does not exist 'meta::pure::functions::lang::copy(FO_Person[1],String[1],KeyExpression[1])'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::fold::testFoldWithEmptyAccumulator_Function_1__Boolean_1_", "Match failure: FoldRelationalLambdaObject instanceOf FoldRelationalLambda", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::fold::testFoldWithSingleValue_Function_1__Boolean_1_", "Match failure: FoldRelationalLambdaObject instanceOf FoldRelationalLambda", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::fold::testFold_FromVariantAsPrimitive_Function_1__Boolean_1_", "Match failure: FoldRelationalLambdaObject instanceOf FoldRelationalLambda", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::fold::testFold_FromVariant_Function_1__Boolean_1_", "Match failure: FoldRelationalLambdaObject instanceOf FoldRelationalLambda", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::fold::testFold_Function_1__Boolean_1_", "Function does not exist 'meta::pure::functions::lang::copy(FO_Person[1],String[1],KeyExpression[1])'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::fold::testIntegerSum_Function_1__Boolean_1_", "Match failure: FoldRelationalLambdaObject instanceOf FoldRelationalLambda", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::fold::testStringSum_Function_1__Boolean_1_", "Match failure: FoldRelationalLambdaObject instanceOf FoldRelationalLambda", AdapterQualifier.unsupportedFeature),
+
+ // ForAll
+ one("meta::pure::functions::collection::tests::forall::testforAllOnEmptySet_Function_1__Boolean_1_", "No SQL translation exists for the PURE function 'forAll_T_MANY__Function_1__Boolean_1_'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::forall::testforAllOnNonEmptySetIsFalse_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'forAll_T_MANY__Function_1__Boolean_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::forall::testforAllOnNonEmptySetIsTrue_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'forAll_T_MANY__Function_1__Boolean_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+
+ //Get
+ one("meta::pure::functions::collection::tests::get::testGet_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\"", AdapterQualifier.unsupportedFeature),
+
+ //Head
+ one("meta::pure::functions::collection::tests::head::testHeadComplex_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::head::testHeadOnEmptySet_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::head::testHeadOnOneElement_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::head::testHeadSimple_Function_1__Boolean_1_", "\"Cannot cast a collection of size 2 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+
+ //IndexOf
+ one("meta::pure::functions::collection::tests::indexof::testIndexOfOneElement_Function_1__Boolean_1_", "\"\nexpected: 0\nactual: 1\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::indexof::testIndexOf_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\"", AdapterQualifier.unsupportedFeature),
+
+ //Init
+ one("meta::pure::functions::collection::tests::init::testInitOnEmptySet_Function_1__Boolean_1_", "Function does not exist 'meta::pure::functions::collection::init(Nil[0])'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::init::testInitOneElement_Function_1__Boolean_1_", "Function does not exist 'meta::pure::functions::collection::init(String[1])'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::init::testInit_Function_1__Boolean_1_", "Function does not exist 'meta::pure::functions::collection::init(String[3])'", AdapterQualifier.unsupportedFeature),
+
+ //Keys
+ one("meta::pure::functions::collection::tests::keys::testKeys_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\"", AdapterQualifier.unsupportedFeature),
+
+ // Last
+ one("meta::pure::functions::collection::tests::last::testLastFromEmpty_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'last_T_MANY__T_$0_1$_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::last::testLastOfOneElementList_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'last_T_MANY__T_$0_1$_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::last::testLast_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'last_T_MANY__T_$0_1$_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+
+ //Put
+ one("meta::pure::functions::collection::tests::put::testPut_addsEntry_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::put::testPut_emptyMap_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::put::testPut_overridesEntry_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\"", AdapterQualifier.unsupportedFeature),
+
+ //PutAll
+ one("meta::pure::functions::collection::tests::putAll::testPutAll_emptyInputMap_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::putAll::testPutAll_emptyPutEntries_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::putAll::testPutAll_overridesExistingAndAddNew_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\"", AdapterQualifier.unsupportedFeature),
+
+ //RemoveDuplicates
+ one("meta::pure::functions::collection::tests::removeDuplicates::testRemoveDuplicatesEmptyListExplicit_Function_1__Boolean_1_", "No SQL translation exists for the PURE function 'removeDuplicates_T_MANY__Function_$0_1$__Function_$0_1$__T_MANY_'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::removeDuplicates::testRemoveDuplicatesEmptyList_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'removeDuplicates_T_MANY__Function_$0_1$__Function_$0_1$__T_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::removeDuplicates::testRemoveDuplicatesPrimitiveNonStandardFunction_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'removeDuplicates_T_MANY__Function_$0_1$__Function_$0_1$__T_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::removeDuplicates::testRemoveDuplicatesPrimitiveStandardFunctionExplicit_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'removeDuplicates_T_MANY__Function_$0_1$__Function_$0_1$__T_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::removeDuplicates::testRemoveDuplicatesPrimitiveStandardFunction_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'removeDuplicates_T_MANY__Function_$0_1$__Function_$0_1$__T_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::removeDuplicatesBy::testRemoveDuplicatesByPrimitive_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'removeDuplicates_T_MANY__Function_$0_1$__Function_$0_1$__T_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+
+ //Reverse
+ one("meta::pure::functions::collection::tests::reverse::testReverseEmpty_Function_1__Boolean_1_", "Couldn't find DynaFunction to Postgres model translation for toVariantList().", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::reverse::testReverse_Function_1__Boolean_1_", "Couldn't find DynaFunction to Postgres model translation for toVariantList().", AdapterQualifier.unsupportedFeature),
+
+ //Slice
+ one("meta::pure::functions::collection::tests::slice::testSliceEqualBounds_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::slice::testSliceInList_Function_1__Boolean_1_", "Couldn't find DynaFunction to Postgres model translation for toVariantList().", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::slice::testSliceOnBounds_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::slice::testSliceOutOfBounds_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::slice::testSlice_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\"", AdapterQualifier.unsupportedFeature),
+
+ // Sort
+ one("meta::pure::functions::collection::tests::sort::testMixedSortNoComparator_Function_1__Boolean_1_", "Couldn't find DynaFunction to Postgres model translation for toVariantList().", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::sort::testSimpleSortNoComparator_Function_1__Boolean_1_", "Couldn't find DynaFunction to Postgres model translation for toVariantList().", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::sort::testSimpleSortReversed_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'sort_T_m__Function_$0_1$__Function_$0_1$__T_m_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::sort::testSimpleSortWithFunctionVariables_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'sort_T_m__Function_$0_1$__Function_$0_1$__T_m_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::sort::testSimpleSortWithKey_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'sort_T_m__Function_$0_1$__Function_$0_1$__T_m_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::sort::testSimpleSort_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'sort_T_m__Function_$0_1$__Function_$0_1$__T_m_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::sort::testSortEmptySet_Function_1__Boolean_1_", "Couldn't find DynaFunction to Postgres model translation for toVariantList().", AdapterQualifier.unsupportedFeature),
+
+ //Tail
+ one("meta::pure::functions::collection::tests::tail::testTailOnEmptySet_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'tail_T_MANY__T_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::tail::testTailOneElement_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'tail_T_MANY__T_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::tail::testTail_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'tail_T_MANY__T_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+
+ //Take
+ one("meta::pure::functions::collection::tests::take::testTakeExceedsSizeOnNonEmptyList_Function_1__Boolean_1_", "Variant ->take() not supported yet", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::take::testTakeInList_Function_1__Boolean_1_", "Variant ->take() not supported yet", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::take::testTakeManyOnNonEmptyList_Function_1__Boolean_1_", "Variant ->take() not supported yet", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::take::testTakeNegativeOnEmptyList_Function_1__Boolean_1_", "\"Invalid type for parameter inside the take/limit function. Expected a value, found operation/function\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::take::testTakeNegativeOnNonEmptyList_Function_1__Boolean_1_", "Variant ->take() not supported yet", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::take::testTakeOneOnNonEmptyList_Function_1__Boolean_1_", "Variant ->take() not supported yet", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::take::testTakeZeroOnNonEmptyList_Function_1__Boolean_1_", "Variant ->take() not supported yet", AdapterQualifier.needsInvestigation),
+
+ //Values
+ one("meta::pure::functions::collection::tests::values::testValues_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\"", AdapterQualifier.unsupportedFeature),
+
+ //Zip
+ one("meta::pure::functions::collection::tests::zip::testZipBothListsAreOfPairs_Function_1__Boolean_1_", "No SQL translation exists for the PURE function 'zip_T_MANY__U_MANY__Pair_MANY_'.", AdapterQualifier.needsImplementation),
+ one("meta::pure::functions::collection::tests::zip::testZipBothListsEmpty_Function_1__Boolean_1_", "\"The system is trying to get an element at offset 0 where the collection is of size 0\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::zip::testZipBothListsSameLength_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'zip_T_MANY__U_MANY__Pair_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::zip::testZipFirstListEmpty_Function_1__Boolean_1_", "\"The system is trying to get an element at offset 0 where the collection is of size 0\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::zip::testZipFirstListLonger_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'zip_T_MANY__U_MANY__Pair_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::zip::testZipFirstListsIsOfPairs_Function_1__Boolean_1_", "No SQL translation exists for the PURE function 'zip_T_MANY__U_MANY__Pair_MANY_'.", AdapterQualifier.needsImplementation),
+ one("meta::pure::functions::collection::tests::zip::testZipSecondListEmpty_Function_1__Boolean_1_", "\"The system is trying to get an element at offset 0 where the collection is of size 0\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::collection::tests::zip::testZipSecondListLonger_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'zip_T_MANY__U_MANY__Pair_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::collection::tests::zip::testZipSecondListsIsOfPairs_Function_1__Boolean_1_", "No SQL translation exists for the PURE function 'zip_T_MANY__U_MANY__Pair_MANY_'.", AdapterQualifier.needsImplementation),
+
+ //Match
+ one("meta::pure::functions::lang::tests::match::testMatchManyWithMany_Function_1__Boolean_1_", "\"Match only supports operands with multiplicity [1]..! Current operand : ['w', 'w', 'w']\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::lang::tests::match::testMatchOneWithMany_Function_1__Boolean_1_", "\"Match does not support Non-Primitive return type..! Current return type : Any\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::lang::tests::match::testMatchOneWithZeroOne_Function_1__Boolean_1_", "\"Match does not support Non-Primitive return type..! Current return type : Any\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::lang::tests::match::testMatchOneWith_Function_1__Boolean_1_", "\"Match does not support Non-Primitive return type..! Current return type : Any\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::lang::tests::match::testMatchWithExtraParam_Function_1__Boolean_1_", "No SQL translation exists for the PURE function 'match_Any_MANY__Function_$1_MANY$__P_o__T_m_'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::lang::tests::match::testMatchWithExtraParamsAndFunctionsAsParam_Function_1__Boolean_1_", "No SQL translation exists for the PURE function 'match_Any_MANY__Function_$1_MANY$__P_o__T_m_'", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::lang::tests::match::testMatchWithFunctionsAsParamManyMatch_Function_1__Boolean_1_", "\"Match does not support Non-Primitive return type..! Current return type : Any\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::lang::tests::match::testMatchWithFunctionsAsParam_Function_1__Boolean_1_", "\"Cast exception: Literal cannot be cast to SemiStructuredPropertyAccess\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::lang::tests::match::testMatchWithFunctionsManyMatch_Function_1__Boolean_1_", "\"Match does not support Non-Primitive return type..! Current return type : Any\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::lang::tests::match::testMatchWithFunctions_Function_1__Boolean_1_", "\"Cast exception: Literal cannot be cast to SemiStructuredPropertyAccess\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::lang::tests::match::testMatchWithMixedReturnType_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::lang::tests::match::testMatchZeroWithMany_Function_1__Boolean_1_", "\"Match does not support Non-Primitive return type..! Current return type : Any\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::lang::tests::match::testMatchZeroWithZero_Function_1__Boolean_1_", "\"Match does not support Non-Primitive return type..! Current return type : Any\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::lang::tests::match::testMatch_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+
+ //Date
+ one("meta::pure::functions::date::tests::testAdjustReflectiveEvaluation_Function_1__Boolean_1_", "Can't find a match for function 'meta::pure::functions::lang::eval(NativeFunction<{Date[1], Integer[1], DurationUnit[1]->Date[1]}>[1],StrictDate[1],Integer[1],DurationUnit[1])'.", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testDateFromHour_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'date_Integer_1__Integer_1__Integer_1__Integer_1__DateTime_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testDateFromMinute_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'date_Integer_1__Integer_1__Integer_1__Integer_1__Integer_1__DateTime_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testDateFromMonth_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'date_Integer_1__Integer_1__Date_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testDateFromSecond_Function_1__Boolean_1_", "\"\nexpected: %1973-11-13T23:09:11+0000\nactual: %1973-11-13T23:09:11.000000000+0000\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::date::tests::testDateFromSubSecond_Function_1__Boolean_1_", "\"\nexpected: %1973-11-13T23:09:11.0+0000\nactual: %1973-11-13T23:09:11.000000000+0000\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::date::tests::testDateFromYear_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'date_Integer_1__Date_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testHasDay_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'hasDay_Date_1__Boolean_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testHasHour_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'hasHour_Date_1__Boolean_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testHasMinute_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'hasMinute_Date_1__Boolean_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testHasMonthReflect_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'hasMonth_Date_1__Boolean_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testHasMonth_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'hasMonth_Date_1__Boolean_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testHasSecond_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'hasSecond_Date_1__Boolean_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testHasSubsecondWithAtLeastPrecision_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'hasSubsecondWithAtLeastPrecision_Date_1__Integer_1__Boolean_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testHasSubsecond_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'hasSubsecond_Date_1__Boolean_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testHour_Function_1__Boolean_1_", "\"\nexpected: 17\nactual: 0\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::date::tests::testMinute_Function_1__Boolean_1_", "\"\nexpected: 9\nactual: 0\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::date::tests::testDateDiffWeeks_Function_1__Boolean_1_", "\"\nexpected: 1\nactual: 0\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::date::tests::testDateDiffYears_Function_1__Boolean_1_", "\"Ensure the target system understands Year or Year-month semantic.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testAdjustByYears_Function_1__Boolean_1_", "\"Ensure the target system understands Year or Year-month semantic.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testDatePartYearMonthOnly_Function_1__Boolean_1_", "Date has no day: 1973-11", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::date::tests::testDatePartYearOnly_Function_1__Boolean_1_", "\"Ensure the target system understands Year or Year-month semantic.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testMonthNumber_Function_1__Boolean_1_", "Date has no day: 2015-04", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::date::tests::testYear_Function_1__Boolean_1_", "\"Ensure the target system understands Year or Year-month semantic.\"", AdapterQualifier.unsupportedFeature),
+
+ one("meta::pure::functions::date::tests::testAdjustByDaysBigNumber_Function_1__Boolean_1_", "GENERIC_INTERNAL_ERROR: integer overflow", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testAdjustByHoursBigNumber_Function_1__Boolean_1_", "INVALID_FUNCTION_ARGUMENT: integer overflow", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testAdjustByMicrosecondsBigNumber_Function_1__Boolean_1_", "INVALID_FUNCTION_ARGUMENT: 'microsecond' is not a valid TIMESTAMP field", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testAdjustByMicroseconds_Function_1__Boolean_1_", "INVALID_FUNCTION_ARGUMENT: 'microsecond' is not a valid TIMESTAMP field", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testAdjustByMillisecondsBigNumber_Function_1__Boolean_1_", "INVALID_FUNCTION_ARGUMENT: integer overflow", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testAdjustByMinutesBigNumber_Function_1__Boolean_1_", "INVALID_FUNCTION_ARGUMENT: integer overflow", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testAdjustByMonthsBigNumber_Function_1__Boolean_1_", "GENERIC_INTERNAL_ERROR: integer overflow", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testAdjustByMonths_Function_1__Boolean_1_", "Date has no day: 2012-03", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::date::tests::testAdjustBySecondsBigNumber_Function_1__Boolean_1_", "INVALID_FUNCTION_ARGUMENT: integer overflow", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::date::tests::testAdjustByWeeksBigNumber_Function_1__Boolean_1_", "GENERIC_INTERNAL_ERROR: integer overflow", AdapterQualifier.unsupportedFeature),
+
+ //Abs
+ one("meta::pure::functions::math::tests::abs::testDecimalAbs_Function_1__Boolean_1_", "\"\nexpected: 3.0D\nactual: 3D\""),
+
+ //Mod
+ one("meta::pure::functions::math::tests::mod::testModInEval_Function_1__Boolean_1_", "\"No matched function in function registry for - mod(IntegerSqlType, IntegerSqlType, IntegerSqlType).\n" +
+ "Available variations for that function - [\n" +
+ " mod(AbstractIntegerSqlType, AbstractIntegerSqlType):AbstractIntegerSqlType,\n" +
+ " mod(DoubleSqlType, DoubleSqlType):DoubleSqlType,\n" +
+ " mod(AbstractNumericSqlType, AbstractNumericSqlType):AbstractNumericSqlType\n" +
+ "]\"", AdapterQualifier.unsupportedFeature),
+
+ // Pow
+ one("meta::pure::functions::math::tests::pow::testNumberPow_Function_1__Boolean_1_", "\"\nexpected: 9.0\nactual: 27.0\"", AdapterQualifier.needsInvestigation),
+
+ //Rem
+ one("meta::pure::functions::math::tests::rem::testRemWithDecimals_Function_1__Boolean_1_", "\"\nexpected: 0.14D\nactual: 0.14000000000000012\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::math::tests::rem::testRemInEvalWithNegativeNumbers_Function_1__Boolean_1_", "\"No matched function in function registry for - mod(IntegerSqlType, DoubleSqlType, IntegerSqlType).\n" +
+ "Available variations for that function - [\n" +
+ " mod(AbstractIntegerSqlType, AbstractIntegerSqlType):AbstractIntegerSqlType,\n" +
+ " mod(DoubleSqlType, DoubleSqlType):DoubleSqlType,\n" +
+ " mod(AbstractNumericSqlType, AbstractNumericSqlType):AbstractNumericSqlType\n" +
+ "]\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::math::tests::rem::testRemInEval_Function_1__Boolean_1_", "\"No matched function in function registry for - mod(IntegerSqlType, IntegerSqlType, IntegerSqlType).\n" +
+ "Available variations for that function - [\n" +
+ " mod(AbstractIntegerSqlType, AbstractIntegerSqlType):AbstractIntegerSqlType,\n" +
+ " mod(DoubleSqlType, DoubleSqlType):DoubleSqlType,\n" +
+ " mod(AbstractNumericSqlType, AbstractNumericSqlType):AbstractNumericSqlType\n" +
+ "]\"", AdapterQualifier.unsupportedFeature),
+
+ //Round
+ one("meta::pure::functions::math::tests::round::testNegativeFloatRoundHalfEvenUp_Function_1__Boolean_1_", "\"\nexpected: -16\nactual: -17\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::math::tests::round::testPositiveFloatRoundHalfEvenDown_Function_1__Boolean_1_", "\"\nexpected: 16\nactual: 17\"", AdapterQualifier.needsInvestigation),
+
+ //ToDecimal
+ one("meta::pure::functions::math::tests::toDecimal::testDecimalToDecimal_Function_1__Boolean_1_", "\"\nexpected: 3.8D\nactual: 4D\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::math::tests::toDecimal::testDoubleToDecimal_Function_1__Boolean_1_", "\"\nexpected: 3.8D\nactual: 4D\"", AdapterQualifier.needsInvestigation),
+
+ //Format
+ one("meta::pure::functions::string::tests::format::testFormatBoolean_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::format::testFormatDate_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::format::testFormatFloatWithRounding_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::format::testFormatFloatWithTruncation_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::format::testFormatFloatWithZeroPadding_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::format::testFormatFloat_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::toString::testPairCollectionToString_Function_1__Boolean_1_", "Cast exception: StoreRoutingStrategy cannot be cast to StoreMappingRoutingStrategy", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::format::testFormatInEvaluate_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::format::testFormatIntegerWithZeroPadding_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::format::testFormatInteger_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::format::testFormatList_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::format::testFormatPair_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::format::testFormatRepr_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::format::testFormatString_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::format::testSimpleFormatDate_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::format::testFormatInEval_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'format_String_1__Any_MANY__String_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+
+ //IndexOf
+ one("meta::pure::functions::string::tests::indexOf::testFromIndex_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'indexOf_String_1__String_1__Integer_1__Integer_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::indexOf::testSimple_Function_1__Boolean_1_", "\"\nexpected: 4\nactual: 5\"", AdapterQualifier.needsInvestigation),
+
+ //JoinStrings
+ one("meta::pure::functions::string::tests::joinStrings::testJoinStringsNoStrings_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'tail_T_MANY__T_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::joinStrings::testJoinStringsSingleString_Function_1__Boolean_1_", "\"\nexpected: '[a]'\nactual: 'a'\"", AdapterQualifier.needsInvestigation),
+
+ // ParseDate
+ one("meta::pure::functions::string::tests::parseDate::testParseDateTypes_Function_1__Boolean_1_", "INVALID_FUNCTION_ARGUMENT: Invalid format: \"2014-02-27T00:00:00.000000\" is malformed at \"T00:00:00.000000\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::parseDate::testParseDateWithZ_Function_1__Boolean_1_", "INVALID_FUNCTION_ARGUMENT: Invalid format: \"2014-02-27T10:01:35.231Z\" is malformed at \"T10:01:35.231Z\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::parseDate::testParseDate_Function_1__Boolean_1_", "INVALID_FUNCTION_ARGUMENT: Invalid format: \"2014-02-27T10:01:35.231\" is malformed at \"T10:01:35.231\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::parseDate::testParseDateWithTimezone_Function_1__Boolean_1_", "INVALID_FUNCTION_ARGUMENT: Invalid format: \"2014-02-27T10:01:35.231-0500\" is malformed at \"T10:01:35.231-0500\"", AdapterQualifier.needsInvestigation),
+
+ // ParseDecimal
+ one("meta::pure::functions::string::tests::parseDecimal::testParseDecimal_Function_1__Boolean_1_", "INVALID_CAST_ARGUMENT: Cannot cast VARCHAR '3.14159d' to DECIMAL(5, 2). Value is not a number.", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::parseDecimal::testParseZero_Function_1__Boolean_1_", "\"\nexpected: 0.000D\nactual: 0.0D\"", AdapterQualifier.needsInvestigation),
+
+ // ParseInteger
+ one("meta::pure::functions::string::tests::parseInteger::testParseInteger_Function_1__Boolean_1_", "INVALID_CAST_ARGUMENT: Cannot cast '9999999999999992' to INT", AdapterQualifier.needsInvestigation),
+
+ //Split
+ one("meta::pure::functions::string::tests::split::testSplitWithNoSplit_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'split_String_1__String_1__String_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::split::testSplit_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'split_String_1__String_1__String_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\"", AdapterQualifier.unsupportedFeature),
+
+ //Substring
+ one("meta::pure::functions::string::tests::substring::testStartEnd_Function_1__Boolean_1_", "\"\nexpected: 'he quick brown fox jumps over the lazy do'\nactual: 'he quick brown fox jumps over the lazy dog'\"", AdapterQualifier.needsInvestigation),
+
+ //To String
+ one("meta::pure::functions::string::tests::toString::testClassToString_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::toString::testComplexClassToString_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::toString::testDateTimeToString_Function_1__Boolean_1_", "\"\nexpected: '2014-01-01T00:00:00.000+0000'\nactual: '2014-01-01 00:00:00.000'\""),
+ one("meta::pure::functions::string::tests::toString::testDateTimeWithTimezoneToString_Function_1__Boolean_1_", "\"\nexpected: '2014-01-01T00:00:00.0000+0000'\nactual: '2014-01-01 00:00:00.0000'\""),
+ one("meta::pure::functions::string::tests::toString::testDateToString_Function_1__Boolean_1_", "Date has no day: 2014-01", AdapterQualifier.unsupportedFeature),
+ one("meta::pure::functions::string::tests::toString::testEnumerationToString_Function_1__Boolean_1_", "\"Match failure: ClassInstanceHolderObject instanceOf ClassInstanceHolder\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::toString::testFloatToStringWithNegativeExponent_Function_1__Boolean_1_", "\"\nexpected: '0.000000013421'\nactual: '1.3421E-8'\""),
+ one("meta::pure::functions::string::tests::toString::testFloatToStringWithPositiveExponent_Function_1__Boolean_1_", "\"\nexpected: '134210000.0'\nactual: '1.3421E8'\""),
+ one("meta::pure::functions::string::tests::toString::testListToString_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::toString::testPairCollectionToString_Function_1__Boolean_1_", "StoreRoutingStrategy cannot be cast to StoreMappingRoutingStrategy", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::toString::testPairToString_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\"", AdapterQualifier.needsInvestigation),
+ one("meta::pure::functions::string::tests::toString::testSimpleDateToString_Function_1__Boolean_1_", "\"\nexpected: '2014-01-02T01:54:27.352+0000'\nactual: '2014-01-02 01:54:27.352'\"")
+ );
+
+ public static Test suite()
+ {
+ return wrapSuite(
+ () -> true,
+ () -> PureTestBuilderCompiled.buildPCTTestSuite(reportScope, expectedFailures, adapter),
+ () -> false,
+ Lists.mutable.with((TestServerResource) TestConnectionIntegrationLoader.extensions().select(c -> c.getDatabaseType() == DatabaseType.Athena).getFirst())
+ );
+ }
+
+ @Override
+ public MutableList expectedFailures()
+ {
+ return expectedFailures;
+ }
+
+ @Override
+ public ReportScope getReportScope()
+ {
+ return reportScope;
+ }
+
+ @Override
+ public Adapter getAdapter()
+ {
+ return adapter;
+ }
+
+ @Override
+ public String getPlatform()
+ {
+ return platform;
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_GrammarFunctions_PCT.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_GrammarFunctions_PCT.java
new file mode 100644
index 00000000000..b999d4df948
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_GrammarFunctions_PCT.java
@@ -0,0 +1,165 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct;
+
+import junit.framework.Test;
+import org.eclipse.collections.api.factory.Lists;
+import org.eclipse.collections.api.list.MutableList;
+import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.TestConnectionIntegrationLoader;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType;
+import org.finos.legend.engine.test.shared.framework.TestServerResource;
+import org.finos.legend.pure.code.core.CoreRelationalAthenaPCTCodeRepositoryProvider;
+import org.finos.legend.pure.m3.PlatformCodeRepositoryProvider;
+import org.finos.legend.pure.m3.pct.reports.config.PCTReportConfiguration;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.AdapterQualifier;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.ExclusionSpecification;
+import org.finos.legend.pure.m3.pct.reports.model.Adapter;
+import org.finos.legend.pure.m3.pct.shared.model.ReportScope;
+import org.finos.legend.pure.runtime.java.compiled.testHelper.PureTestBuilderCompiled;
+
+import static org.finos.legend.engine.test.shared.framework.PureTestHelperFramework.wrapSuite;
+
+public class Test_Relational_Athena_GrammarFunctions_PCT extends PCTReportConfiguration
+{
+ private static final ReportScope reportScope = PlatformCodeRepositoryProvider.grammarFunctions;
+ private static final Adapter adapter = CoreRelationalAthenaPCTCodeRepositoryProvider.athenaAdapter;
+ private static final String platform = "compiled";
+ private static final MutableList expectedFailures = Lists.mutable.with(
+
+ //Conjunctions
+ one("meta::pure::functions::boolean::tests::conjunctions::not::testNotInCollection_Function_1__Boolean_1_", "\"->at(...) function is supported only after direct access of 1->MANY properties. Current expression: [false, false -> not()] -> at(1)\""),
+
+ //Equality eq
+ one("meta::pure::functions::boolean::tests::equality::eq::testEqNonPrimitive_Function_1__Boolean_1_", "\"Filter expressions are only supported for Primitives and Enums. Filter contains a parameter of type SideClass\""),
+ one("meta::pure::functions::boolean::tests::equality::eq::testEqPrimitiveExtension_Function_1__Boolean_1_", "\"Filter expressions are only supported for Primitives and Enums. Filter contains a parameter of type SideClass\""),
+ one("meta::pure::functions::boolean::tests::equality::eq::testEqVarIdentity_Function_1__Boolean_1_", "Error in 'meta::relational::tests::pct::process::myMapping': Can't find the main table for class 'BottomClass'. Please specify a main table using the ~mainTable directive."),
+ one("meta::pure::functions::boolean::tests::equality::eq::testEqDate_Function_1__Boolean_1_", "\"Ensure the target system understands Year or Year-month semantic.\""),
+ one("meta::pure::functions::boolean::tests::equality::eq::testEqEnum_Function_1__Boolean_1_", "\"Assert failed\""),
+
+ //Equality equal
+ one("meta::pure::functions::boolean::tests::equality::equal::testEqualNonPrimitive_Function_1__Boolean_1_", "\"Filter expressions are only supported for Primitives and Enums. Filter contains a parameter of type SideClass\""),
+ one("meta::pure::functions::boolean::tests::equality::equal::testEqualPrimitiveExtension_Function_1__Boolean_1_", "\"Filter expressions are only supported for Primitives and Enums. Filter contains a parameter of type SideClass\""),
+ one("meta::pure::functions::boolean::tests::equality::equal::testEqualVarIdentity_Function_1__Boolean_1_", "Error in 'meta::relational::tests::pct::process::myMapping': Can't find the main table for class 'BottomClass'. Please specify a main table using the ~mainTable directive."),
+ one("meta::pure::functions::boolean::tests::equality::equal::testEqualDateStrictYear_Function_1__Boolean_1_", "\"Ensure the target system understands Year or Year-month semantic.\""),
+ one("meta::pure::functions::boolean::tests::equality::equal::testEqualEnum_Function_1__Boolean_1_", "\"Assert failed\""),
+
+ //Inequality
+ one("meta::pure::functions::boolean::tests::inequalities::greaterThan::testGreaterThan_Boolean_Function_1__Boolean_1_", "\"Assert failed\""),
+ one("meta::pure::functions::boolean::tests::inequalities::greaterThanEqual::testGreaterThanEqual_Boolean_Function_1__Boolean_1_", "\"Assert failed\""),
+
+ //Collections filter
+ one("meta::pure::functions::collection::tests::filter::testFilterInstance_Function_1__Boolean_1_", "Error dynamically evaluating value specification (from /platform/pure/grammar/functions/collection/iteration/filter.pure:51cc46-50); error compiling generated Java code:\nimport org.eclipse.collections.api.LazyIterable;\nimport org.eclipse.collections.api.block.function.Function0;\nimport org.eclipse.collections.api.block.function.Function;\nimport org.eclipse.collections.api.block.function.Function2;\nimport org.eclipse.collections.api.block.predicate.Predicate;\nimport org.eclipse.collections.api.block.procedure.Procedure;\nimport org.eclipse.collections.api.map.ImmutableMap;\nimport org.eclipse.collections.api.map.MutableMap;\nimport org.eclipse.collections.api.map.MutableMapIterable;\nimport org.eclipse.collections.api.map.MapIterable;\nimport org.eclipse.collections.api.map.primitive.IntObjectMap;\nimport org.eclipse.collections.api.set.MutableSet;\nimport org.eclipse.collections.api.set.SetIterable;\nimport org.eclipse.collections.api.list.MutableList;\nimport org.eclipse.collections.api.list.ListIterable;\nimport org.eclipse.collections.api.RichIterable;\nimport org.eclipse.collections.api.tuple.Pair;\nimport org.eclipse.collections.impl.factory.Lists;\nimport org.eclipse.collections.impl.factory.Maps;\nimport org.eclipse.collections.impl.map.mutable.UnifiedMap;\nimport org.eclipse.collections.impl.map.strategy.mutable.UnifiedMapWithHashingStrategy;\nimport org.eclipse.collections.impl.set.mutable.UnifiedSet;\nimport org.eclipse.collections.impl.set.strategy.mutable.UnifiedSetWithHashingStrategy;\nimport org.eclipse.collections.impl.list.mutable.FastList;\nimport org.eclipse.collections.impl.factory.Sets;\nimport org.eclipse.collections.impl.block.function.checked.CheckedFunction0;\nimport org.eclipse.collections.impl.utility.Iterate;\nimport org.eclipse.collections.impl.utility.LazyIterate;\nimport org.eclipse.collections.impl.utility.StringIterate;\nimport org.finos.legend.pure.m4.coreinstance.CoreInstance;\nimport org.finos.legend.pure.m4.coreinstance.primitive.date.PureDate;\nimport org.finos.legend.pure.m4.coreinstance.primitive.date.DateFunctions;\nimport org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.relationship.Generalization;\nimport org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Type;\nimport org.finos.legend.pure.m3.exception.PureExecutionException;\nimport org.finos.legend.pure.m3.execution.ExecutionSupport;\nimport org.finos.legend.pure.m3.navigation.ProcessorSupport;\nimport org.finos.legend.pure.m3.navigation.PackageableElement.PackageableElement;\nimport org.finos.legend.pure.m3.navigation.generictype.GenericType;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.ChangeType;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.ChangedPath;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.Revision;\nimport org.finos.legend.pure.m3.tools.ListHelper;\nimport org.finos.legend.pure.runtime.java.compiled.execution.*;\nimport org.finos.legend.pure.runtime.java.compiled.execution.sourceInformation.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.coreinstance.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.function.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.function.defended.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.map.*;\nimport org.finos.legend.pure.runtime.java.compiled.metadata.*;\nimport org.finos.legend.pure.runtime.java.compiled.serialization.model.*;\nimport java.lang.reflect.Method;\nimport java.math.BigInteger;\nimport java.sql.DatabaseMetaData;\nimport java.sql.PreparedStatement;\nimport java.sql.ResultSetMetaData;\nimport java.util.Iterator;\nimport java.util.Calendar;\nimport java.util.Map;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\nimport org.json.simple.JSONObject;\n\n\npublic class DynaClass{\n public static org.finos.legend.pure.generated.Root_meta_pure_functions_collection_tests_model_CO_Person doProcess(final MapIterable vars, final MutableMap valMap, final IntObjectMap localLambdas, final ExecutionSupport es){\n return _smith;\n }\n}\n"),
+ one("meta::pure::functions::collection::tests::filter::testFilterLiteralFromVar_Function_1__Boolean_1_", "\"Match failure: FilterRelationalLambdaObject instanceOf FilterRelationalLambda\""),
+ one("meta::pure::functions::collection::tests::filter::testFilterLiteral_Function_1__Boolean_1_", "\"Match failure: FilterRelationalLambdaObject instanceOf FilterRelationalLambda\""),
+ one("meta::pure::functions::collection::tests::filter::testFilter_FromVariantAsPrimitive_Function_1__Boolean_1_", "\"Match failure: FilterRelationalLambdaObject instanceOf FilterRelationalLambda\""),
+ one("meta::pure::functions::collection::tests::filter::testFilter_FromVariant_Function_1__Boolean_1_", "\"Match failure: FilterRelationalLambdaObject instanceOf FilterRelationalLambda\""),
+ one("meta::pure::functions::collection::tests::filter::testLambdaAsFunctionParameter_Function_1__Boolean_1_", "\"Match failure: FilterRelationalLambdaObject instanceOf FilterRelationalLambda\""),
+
+ //Collections first
+ one("meta::pure::functions::collection::tests::first::testFirstSimple_Function_1__Boolean_1_", "\"Cannot cast a collection of size 2 to multiplicity [1]\""),
+ one("meta::pure::functions::collection::tests::first::testFirstComplex_Function_1__Boolean_1_", "\"Expected at most one object, but found many\""),
+
+ //Collections map
+ one("meta::pure::functions::collection::tests::map::testMapInstance_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\""),
+ one("meta::pure::functions::collection::tests::map::testMapRelationshipFromManyToMany_Function_1__Boolean_1_", "Error dynamically evaluating value specification (from /platform/pure/grammar/functions/collection/iteration/map.pure:65cc79-83); error compiling generated Java code:\nimport org.eclipse.collections.api.LazyIterable;\nimport org.eclipse.collections.api.block.function.Function0;\nimport org.eclipse.collections.api.block.function.Function;\nimport org.eclipse.collections.api.block.function.Function2;\nimport org.eclipse.collections.api.block.predicate.Predicate;\nimport org.eclipse.collections.api.block.procedure.Procedure;\nimport org.eclipse.collections.api.map.ImmutableMap;\nimport org.eclipse.collections.api.map.MutableMap;\nimport org.eclipse.collections.api.map.MutableMapIterable;\nimport org.eclipse.collections.api.map.MapIterable;\nimport org.eclipse.collections.api.map.primitive.IntObjectMap;\nimport org.eclipse.collections.api.set.MutableSet;\nimport org.eclipse.collections.api.set.SetIterable;\nimport org.eclipse.collections.api.list.MutableList;\nimport org.eclipse.collections.api.list.ListIterable;\nimport org.eclipse.collections.api.RichIterable;\nimport org.eclipse.collections.api.tuple.Pair;\nimport org.eclipse.collections.impl.factory.Lists;\nimport org.eclipse.collections.impl.factory.Maps;\nimport org.eclipse.collections.impl.map.mutable.UnifiedMap;\nimport org.eclipse.collections.impl.map.strategy.mutable.UnifiedMapWithHashingStrategy;\nimport org.eclipse.collections.impl.set.mutable.UnifiedSet;\nimport org.eclipse.collections.impl.set.strategy.mutable.UnifiedSetWithHashingStrategy;\nimport org.eclipse.collections.impl.list.mutable.FastList;\nimport org.eclipse.collections.impl.factory.Sets;\nimport org.eclipse.collections.impl.block.function.checked.CheckedFunction0;\nimport org.eclipse.collections.impl.utility.Iterate;\nimport org.eclipse.collections.impl.utility.LazyIterate;\nimport org.eclipse.collections.impl.utility.StringIterate;\nimport org.finos.legend.pure.m4.coreinstance.CoreInstance;\nimport org.finos.legend.pure.m4.coreinstance.primitive.date.PureDate;\nimport org.finos.legend.pure.m4.coreinstance.primitive.date.DateFunctions;\nimport org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.relationship.Generalization;\nimport org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Type;\nimport org.finos.legend.pure.m3.exception.PureExecutionException;\nimport org.finos.legend.pure.m3.execution.ExecutionSupport;\nimport org.finos.legend.pure.m3.navigation.ProcessorSupport;\nimport org.finos.legend.pure.m3.navigation.PackageableElement.PackageableElement;\nimport org.finos.legend.pure.m3.navigation.generictype.GenericType;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.ChangeType;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.ChangedPath;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.Revision;\nimport org.finos.legend.pure.m3.tools.ListHelper;\nimport org.finos.legend.pure.runtime.java.compiled.execution.*;\nimport org.finos.legend.pure.runtime.java.compiled.execution.sourceInformation.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.coreinstance.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.function.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.function.defended.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.map.*;\nimport org.finos.legend.pure.runtime.java.compiled.metadata.*;\nimport org.finos.legend.pure.runtime.java.compiled.serialization.model.*;\nimport java.lang.reflect.Method;\nimport java.math.BigInteger;\nimport java.sql.DatabaseMetaData;\nimport java.sql.PreparedStatement;\nimport java.sql.ResultSetMetaData;\nimport java.util.Iterator;\nimport java.util.Calendar;\nimport java.util.Map;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\nimport org.json.simple.JSONObject;\n\n\npublic class DynaClass{\n public static org.finos.legend.pure.generated.Root_meta_pure_functions_collection_tests_map_model_M_Person doProcess(final MapIterable vars, final MutableMap valMap, final IntObjectMap localLambdas, final ExecutionSupport es){\n return _smith;\n }\n}\n"),
+ one("meta::pure::functions::collection::tests::map::testMapRelationshipFromManyToOne_Function_1__Boolean_1_", "Error dynamically evaluating value specification (from /platform/pure/grammar/functions/collection/iteration/map.pure:54cc64-68); error compiling generated Java code:\nimport org.eclipse.collections.api.LazyIterable;\nimport org.eclipse.collections.api.block.function.Function0;\nimport org.eclipse.collections.api.block.function.Function;\nimport org.eclipse.collections.api.block.function.Function2;\nimport org.eclipse.collections.api.block.predicate.Predicate;\nimport org.eclipse.collections.api.block.procedure.Procedure;\nimport org.eclipse.collections.api.map.ImmutableMap;\nimport org.eclipse.collections.api.map.MutableMap;\nimport org.eclipse.collections.api.map.MutableMapIterable;\nimport org.eclipse.collections.api.map.MapIterable;\nimport org.eclipse.collections.api.map.primitive.IntObjectMap;\nimport org.eclipse.collections.api.set.MutableSet;\nimport org.eclipse.collections.api.set.SetIterable;\nimport org.eclipse.collections.api.list.MutableList;\nimport org.eclipse.collections.api.list.ListIterable;\nimport org.eclipse.collections.api.RichIterable;\nimport org.eclipse.collections.api.tuple.Pair;\nimport org.eclipse.collections.impl.factory.Lists;\nimport org.eclipse.collections.impl.factory.Maps;\nimport org.eclipse.collections.impl.map.mutable.UnifiedMap;\nimport org.eclipse.collections.impl.map.strategy.mutable.UnifiedMapWithHashingStrategy;\nimport org.eclipse.collections.impl.set.mutable.UnifiedSet;\nimport org.eclipse.collections.impl.set.strategy.mutable.UnifiedSetWithHashingStrategy;\nimport org.eclipse.collections.impl.list.mutable.FastList;\nimport org.eclipse.collections.impl.factory.Sets;\nimport org.eclipse.collections.impl.block.function.checked.CheckedFunction0;\nimport org.eclipse.collections.impl.utility.Iterate;\nimport org.eclipse.collections.impl.utility.LazyIterate;\nimport org.eclipse.collections.impl.utility.StringIterate;\nimport org.finos.legend.pure.m4.coreinstance.CoreInstance;\nimport org.finos.legend.pure.m4.coreinstance.primitive.date.PureDate;\nimport org.finos.legend.pure.m4.coreinstance.primitive.date.DateFunctions;\nimport org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.relationship.Generalization;\nimport org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Type;\nimport org.finos.legend.pure.m3.exception.PureExecutionException;\nimport org.finos.legend.pure.m3.execution.ExecutionSupport;\nimport org.finos.legend.pure.m3.navigation.ProcessorSupport;\nimport org.finos.legend.pure.m3.navigation.PackageableElement.PackageableElement;\nimport org.finos.legend.pure.m3.navigation.generictype.GenericType;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.ChangeType;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.ChangedPath;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.Revision;\nimport org.finos.legend.pure.m3.tools.ListHelper;\nimport org.finos.legend.pure.runtime.java.compiled.execution.*;\nimport org.finos.legend.pure.runtime.java.compiled.execution.sourceInformation.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.coreinstance.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.function.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.function.defended.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.map.*;\nimport org.finos.legend.pure.runtime.java.compiled.metadata.*;\nimport org.finos.legend.pure.runtime.java.compiled.serialization.model.*;\nimport java.lang.reflect.Method;\nimport java.math.BigInteger;\nimport java.sql.DatabaseMetaData;\nimport java.sql.PreparedStatement;\nimport java.sql.ResultSetMetaData;\nimport java.util.Iterator;\nimport java.util.Calendar;\nimport java.util.Map;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\nimport org.json.simple.JSONObject;\n\n\npublic class DynaClass{\n public static org.finos.legend.pure.generated.Root_meta_pure_functions_collection_tests_map_model_M_Person doProcess(final MapIterable vars, final MutableMap valMap, final IntObjectMap localLambdas, final ExecutionSupport es){\n return _smith;\n }\n}\n"),
+ one("meta::pure::functions::collection::tests::map::testMapRelationshipFromOneToOne_Function_1__Boolean_1_", "\"Error during dynamic reactivation: Error dynamically evaluating value specification (from /platform/pure/grammar/functions/collection/iteration/map.pure:45cc92-98); error compiling generated Java code:\nimport org.eclipse.collections.api.LazyIterable;\nimport org.eclipse.collections.api.block.function.Function0;\nimport org.eclipse.collections.api.block.function.Function;\nimport org.eclipse.collections.api.block.function.Function2;\nimport org.eclipse.collections.api.block.predicate.Predicate;\nimport org.eclipse.collections.api.block.procedure.Procedure;\nimport org.eclipse.collections.api.map.ImmutableMap;\nimport org.eclipse.collections.api.map.MutableMap;\nimport org.eclipse.collections.api.map.MutableMapIterable;\nimport org.eclipse.collections.api.map.MapIterable;\nimport org.eclipse.collections.api.map.primitive.IntObjectMap;\nimport org.eclipse.collections.api.set.MutableSet;\nimport org.eclipse.collections.api.set.SetIterable;\nimport org.eclipse.collections.api.list.MutableList;\nimport org.eclipse.collections.api.list.ListIterable;\nimport org.eclipse.collections.api.RichIterable;\nimport org.eclipse.collections.api.tuple.Pair;\nimport org.eclipse.collections.impl.factory.Lists;\nimport org.eclipse.collections.impl.factory.Maps;\nimport org.eclipse.collections.impl.map.mutable.UnifiedMap;\nimport org.eclipse.collections.impl.map.strategy.mutable.UnifiedMapWithHashingStrategy;\nimport org.eclipse.collections.impl.set.mutable.UnifiedSet;\nimport org.eclipse.collections.impl.set.strategy.mutable.UnifiedSetWithHashingStrategy;\nimport org.eclipse.collections.impl.list.mutable.FastList;\nimport org.eclipse.collections.impl.factory.Sets;\nimport org.eclipse.collections.impl.block.function.checked.CheckedFunction0;\nimport org.eclipse.collections.impl.utility.Iterate;\nimport org.eclipse.collections.impl.utility.LazyIterate;\nimport org.eclipse.collections.impl.utility.StringIterate;\nimport org.finos.legend.pure.m4.coreinstance.CoreInstance;\nimport org.finos.legend.pure.m4.coreinstance.primitive.date.PureDate;\nimport org.finos.legend.pure.m4.coreinstance.primitive.date.DateFunctions;\nimport org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.relationship.Generalization;\nimport org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Type;\nimport org.finos.legend.pure.m3.exception.PureExecutionException;\nimport org.finos.legend.pure.m3.execution.ExecutionSupport;\nimport org.finos.legend.pure.m3.navigation.ProcessorSupport;\nimport org.finos.legend.pure.m3.navigation.PackageableElement.PackageableElement;\nimport org.finos.legend.pure.m3.navigation.generictype.GenericType;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.ChangeType;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.ChangedPath;\nimport org.finos.legend.pure.m3.serialization.filesystem.usercodestorage.vcs.Revision;\nimport org.finos.legend.pure.m3.tools.ListHelper;\nimport org.finos.legend.pure.runtime.java.compiled.execution.*;\nimport org.finos.legend.pure.runtime.java.compiled.execution.sourceInformation.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.coreinstance.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.function.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.function.defended.*;\nimport org.finos.legend.pure.runtime.java.compiled.generation.processors.support.map.*;\nimport org.finos.legend.pure.runtime.java.compiled.metadata.*;\nimport org.finos.legend.pure.runtime.java.compiled.serialization.model.*;\nimport java.lang.reflect.Method;\nimport java.math.BigInteger;\nimport java.sql.DatabaseMetaData;\nimport java.sql.PreparedStatement;\nimport java.sql.ResultSetMetaData;\nimport java.util.Iterator;\nimport java.util.Calendar;\nimport java.util.Map;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\nimport org.json.simple.JSONObject;\n\n\npublic class DynaClass{\n public static org.finos.legend.pure.generated.Root_meta_pure_functions_collection_tests_map_model_M_Address doProcess(final MapIterable vars, final MutableMap valMap, final IntObjectMap localLambdas, final ExecutionSupport es){\n return _address;\n }\n}\n\""),
+ one("meta::pure::functions::collection::tests::map::testMap_FromVariantAsPrimitive_Function_1__Boolean_1_", "\"Match failure: MapRelationalLambdaObject instanceOf MapRelationalLambda\""),
+ one("meta::pure::functions::collection::tests::map::testMap_FromVariant_Function_1__Boolean_1_", "\"Match failure: MapRelationalLambdaObject instanceOf MapRelationalLambda\""),
+
+ //Collections range
+ one("meta::pure::functions::collection::tests::range::testRangeWithStartStopEqual_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'range_Integer_1__Integer_1__Integer_1__Integer_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::collection::tests::range::testRangeWithStep_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'range_Integer_1__Integer_1__Integer_1__Integer_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::collection::tests::range::testRangeWithVariables_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'range_Integer_1__Integer_1__Integer_1__Integer_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::collection::tests::range::testRange_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'range_Integer_1__Integer_1__Integer_1__Integer_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::collection::tests::range::testReverseRangeWithPositiveStep_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'range_Integer_1__Integer_1__Integer_1__Integer_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::collection::tests::range::testReverseRangeWithStep_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'range_Integer_1__Integer_1__Integer_1__Integer_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::collection::tests::range::testReverseRange_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'range_Integer_1__Integer_1__Integer_1__Integer_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+
+ //Collections size
+ one("meta::pure::functions::collection::tests::size::testSize_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\""),
+
+ //Lang compare
+ one("meta::pure::functions::lang::tests::compare::testBooleanCompare_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'compare_T_1__T_1__Integer_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::lang::tests::compare::testCompareDecimalAndLongTypes_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'compare_T_1__T_1__Integer_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::lang::tests::compare::testCompareMixedTypes_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'compare_T_1__T_1__Integer_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::lang::tests::compare::testDateCompare_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'compare_T_1__T_1__Integer_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::lang::tests::compare::testFloatCompare_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'compare_T_1__T_1__Integer_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::lang::tests::compare::testIntegerCompare_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'compare_T_1__T_1__Integer_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::lang::tests::compare::testNumberCompare_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'compare_T_1__T_1__Integer_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::lang::tests::compare::testStringCompare_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'compare_T_1__T_1__Integer_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+
+ //Lang letFn
+ one("meta::pure::functions::lang::tests::letFn::testAssignNewInstance_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\""),
+ one("meta::pure::functions::lang::tests::letFn::testLetAsLastStatement_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'letFunction_String_1__T_m__T_m_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::lang::tests::letFn::testLetChainedWithAnotherFunction_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\""),
+ one("meta::pure::functions::lang::tests::letFn::testLetInsideIf_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'letFunction_String_1__T_m__T_m_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::lang::tests::letFn::testLetWithParam_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'letFunction_String_1__T_m__T_m_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+
+ //Math minus
+ one("meta::pure::functions::math::tests::minus::testDecimalMinus_Function_1__Boolean_1_", "\"\nexpected: -4.0D\nactual: -4D\""),
+ one("meta::pure::functions::math::tests::minus::testSingleMinusType_Function_1__Boolean_1_", "\"Cast exception: StoreRoutingStrategy cannot be cast to StoreMappingRoutingStrategy\""),
+ one("meta::pure::functions::math::tests::minus::testLargeMinus_Function_1__Boolean_1_", "NUMERIC_VALUE_OUT_OF_RANGE: bigint subtraction overflow: -9223372036854775718 - 132"),
+
+ //Math plus
+ one("meta::pure::functions::math::tests::plus::testDecimalPlus_Function_1__Boolean_1_", "\"\nexpected: 6.0D\nactual: 6D\""),
+ one("meta::pure::functions::math::tests::plus::testSinglePlusType_Function_1__Boolean_1_", "\"Cast exception: StoreRoutingStrategy cannot be cast to StoreMappingRoutingStrategy\""),
+ one("meta::pure::functions::math::tests::plus::testLargePlus_Function_1__Boolean_1_", "NUMERIC_VALUE_OUT_OF_RANGE: bigint addition overflow: 9223372036854775807 + 3"),
+
+ //Math times
+ one("meta::pure::functions::math::tests::times::testDecimalTimes_Function_1__Boolean_1_", "\"\nexpected: 353791.470D\nactual: 353791.47000000003\""),
+ one("meta::pure::functions::math::tests::times::testLargeTimes_Function_1__Boolean_1_", "NUMERIC_VALUE_OUT_OF_RANGE: bigint multiplication overflow: 2 * 9223372036854775807"),
+
+ //String plus
+ one("meta::pure::functions::string::tests::plus::testMultiPlusWithPropertyExpressions_Function_1__Boolean_1_", "\"Cannot cast a collection of size 0 to multiplicity [1]\""),
+ one("meta::pure::functions::string::tests::plus::testPlusInCollect_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'at_T_MANY__Integer_1__T_1_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+ one("meta::pure::functions::string::tests::plus::testPlusInIterate_Function_1__Boolean_1_", "\"Match failure: StoreMappingClusteredValueSpecificationObject instanceOf StoreMappingClusteredValueSpecification\"")
+
+ );
+
+ public static Test suite()
+ {
+ return wrapSuite(
+ () -> true,
+ () -> PureTestBuilderCompiled.buildPCTTestSuite(reportScope, expectedFailures, adapter),
+ () -> false,
+ Lists.mutable.with((TestServerResource) TestConnectionIntegrationLoader.extensions().select(c -> c.getDatabaseType() == DatabaseType.Athena).getFirst())
+ );
+ }
+
+ @Override
+ public MutableList expectedFailures()
+ {
+ return expectedFailures;
+ }
+
+ @Override
+ public ReportScope getReportScope()
+ {
+ return reportScope;
+ }
+
+ @Override
+ public Adapter getAdapter()
+ {
+ return adapter;
+ }
+
+ @Override
+ public String getPlatform()
+ {
+ return platform;
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_RelationFunctions_PCT.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_RelationFunctions_PCT.java
new file mode 100644
index 00000000000..6bec45c4dff
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_RelationFunctions_PCT.java
@@ -0,0 +1,181 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct;
+
+import junit.framework.Test;
+import org.eclipse.collections.api.factory.Lists;
+import org.eclipse.collections.api.list.MutableList;
+import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.TestConnectionIntegrationLoader;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType;
+import org.finos.legend.engine.test.shared.framework.TestServerResource;
+import org.finos.legend.pure.code.core.CoreRelationalAthenaPCTCodeRepositoryProvider;
+import org.finos.legend.pure.code.core.RelationCodeRepositoryProvider;
+import org.finos.legend.pure.m3.pct.reports.config.PCTReportConfiguration;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.AdapterQualifier;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.ExclusionSpecification;
+import org.finos.legend.pure.m3.pct.reports.model.Adapter;
+import org.finos.legend.pure.m3.pct.shared.model.ReportScope;
+import org.finos.legend.pure.runtime.java.compiled.testHelper.PureTestBuilderCompiled;
+
+import static org.finos.legend.engine.test.shared.framework.PureTestHelperFramework.wrapSuite;
+
+public class Test_Relational_Athena_RelationFunctions_PCT extends PCTReportConfiguration
+{
+ private static final ReportScope reportScope = RelationCodeRepositoryProvider.relationFunctions;
+ private static final Adapter adapter = CoreRelationalAthenaPCTCodeRepositoryProvider.athenaAdapter;
+ private static final String platform = "compiled";
+ private static final MutableList expectedFailures = Lists.mutable.with(
+
+ //AsOfJoin
+ one("meta::pure::functions::relation::tests::asOfJoin::testAsOfJoinWithKeyMatch_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support AsOfJoin!\""),
+ one("meta::pure::functions::relation::tests::asOfJoin::testAsOfJoinWithKeyMatch_MultipleExpressions_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support AsOfJoin!\""),
+ one("meta::pure::functions::relation::tests::asOfJoin::testSimpleAsOfJoin_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support AsOfJoin!\""),
+ one("meta::pure::functions::relation::tests::asOfJoin::testSimpleAsOfJoin_MultipleExpressions_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support AsOfJoin!\""),
+
+ //Composition
+ one("meta::pure::functions::relation::tests::composition::testVariantArrayColumn_reverse_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::tests::composition::testVariantArrayColumn_sort_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::tests::composition::testVariantColumn_extend_indexExtraction_filter_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::tests::composition::testVariantColumn_functionComposition_Function_1__Boolean_1_", "\"Match failure: FilterRelationalLambdaObject instanceOf FilterRelationalLambda\""),
+ one("meta::pure::functions::relation::tests::composition::testVariantColumn_indexOf_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::tests::composition::testVariantColumn_isEmpty_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::tests::composition::testVariantColumn_isNotEmpty_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::tests::composition::testVariantColumn_slice_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::tests::composition::test_Extend_Filter_Select_ComplexGroupBy_Pivot_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::composition::test_Extend_Filter_Select_GroupBy_Pivot_Extend_Sort_Limit_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::composition::test_Extend_Filter_Select_Pivot_GroupBy_Extend_Sort_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::composition::test_Pivot_Filter_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::composition::testExtendWindowFilter_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support Qualify!\""),
+ one("meta::pure::functions::relation::tests::composition::testGroupByFilterExtendFilter_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support Qualify!\""),
+ one("meta::pure::functions::relation::tests::composition::testMixColumnNamesRenameExtend_Function_1__Boolean_1_", "Error during dynamic function evaluation. The type QuerySpecification is not compatible with the type ExtendedQuerySpecification"),
+ one("meta::pure::functions::relation::tests::composition::testVariant_if_Function_1__Boolean_1_", "Athena does not support type - semistructured"),
+ one("meta::pure::functions::relation::tests::composition::testExtendJoinStringOnNull_Function_1__Boolean_1_", "must be an aggregate expression or appear in GROUP BY clause"),
+
+ //Extend Variant
+ one("meta::pure::functions::relation::tests::extend::testVariantColumn_filter_Function_1__Boolean_1_", "\"Match failure: FilterRelationalLambdaObject instanceOf FilterRelationalLambda\""),
+ one("meta::pure::functions::relation::tests::extend::testVariantColumn_fold_Function_1__Boolean_1_", "\"Match failure: FoldRelationalLambdaObject instanceOf FoldRelationalLambda\""),
+ one("meta::pure::functions::relation::tests::extend::testVariantColumn_indexExtraction_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::tests::extend::testVariantColumn_keyExtraction_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::tests::extend::testVariantColumn_map_Function_1__Boolean_1_", "\"Match failure: MapRelationalLambdaObject instanceOf MapRelationalLambda\""),
+ one("meta::pure::functions::relation::tests::extend::testVariantColumn_Function_1__Boolean_1_", "Athena does not support type - semistructured"),
+
+ //Filter
+ one("meta::pure::functions::relation::tests::filter::testVariantColumn_filterOnIndexExtractionValue_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::tests::filter::testVariantColumn_filterOnKeyExtractionValue_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::tests::filter::testVariantColumn_filterOutputFromLambda_Function_1__Boolean_1_", "\"Match failure: FilterRelationalLambdaObject instanceOf FilterRelationalLambda\""),
+
+ //Lateral
+ one("meta::pure::functions::relation::tests::lateral::testLateralJoinAreInnerJoins_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::LateralJoin\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::lateral::testLateralJoin_Chained_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::LateralJoin\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::lateral::testLateralJoin_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::LateralJoin\" not implemented in SqlDialect for database type \"Athena\"\""),
+
+ //Pivot
+ one("meta::pure::functions::relation::tests::pivot::testPivot_MultipleMultiple_Dynamic_Aggregation_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::pivot::testPivot_MultipleMultiple_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::pivot::testPivot_MultipleMultiple_MultipleExpressions_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::pivot::testPivot_MultipleSingle_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::pivot::testPivot_MultipleSingle_MultipleExpressions_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::pivot::testPivot_SingleMultiple_Dynamic_Aggregation_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::pivot::testPivot_SingleMultiple_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::pivot::testPivot_SingleMultiple_MultipleExpressions_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::pivot::testPivot_SingleSingle_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+ one("meta::pure::functions::relation::tests::pivot::testPivot_SingleSingle_MultipleExpressions_Function_1__Boolean_1_", "\"Dialect translation for node of type \"meta::external::query::sql::metamodel::extension::PivotedRelation\" not implemented in SqlDialect for database type \"Athena\"\""),
+
+ //Select
+ one("meta::pure::functions::relation::tests::select::testSingleSelectWithQuotedColumn_Function_1__Boolean_1_", "\"[unsupported-api] special chars are not supported in table/column names\""),
+ one("meta::pure::functions::relation::tests::select::testSingleSelectWithQuotedColumn_MultipleExpressions_Function_1__Boolean_1_", "\"[unsupported-api] special chars are not supported in table/column names\""),
+
+ //Variant Flatten
+ one("meta::pure::functions::relation::variant::tests::flatten::testFlatten_LateralJoin_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::variant::tests::flatten::testFlatten_LateralJoin_Nested_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::relation::variant::tests::flatten::testFlatten_Scalar_Function_1__Boolean_1_", "\"Match failure: SemiStructuredArrayFlattenRelationObject instanceOf SemiStructuredArrayFlattenRelation\""),
+ one("meta::pure::functions::relation::variant::tests::flatten::testFlatten_Variant_Array_Function_1__Boolean_1_", "\"Match failure: SemiStructuredArrayFlattenRelationObject instanceOf SemiStructuredArrayFlattenRelation\""),
+ one("meta::pure::functions::relation::variant::tests::flatten::testFlatten_Variant_Map_Function_1__Boolean_1_", "\"Match failure: SemiStructuredArrayFlattenRelationObject instanceOf SemiStructuredArrayFlattenRelation\""),
+ one("meta::pure::functions::relation::variant::tests::flatten::testFlatten_Variant_Navigation_Function_1__Boolean_1_", "\"Match failure: SemiStructuredArrayFlattenRelationObject instanceOf SemiStructuredArrayFlattenRelation\""),
+
+ //Extend Olap
+ one("meta::pure::functions::relation::tests::extend::testOLAPAggStringWithPartitionAndOrderASCUnboundedWindow_Function_1__Boolean_1_", "must be an aggregate expression or appear in GROUP BY clause"),
+ one("meta::pure::functions::relation::tests::extend::testOLAPAggStringWithPartitionAndOrderUnboundedWindow_Function_1__Boolean_1_", "must be an aggregate expression or appear in GROUP BY clause"),
+ one("meta::pure::functions::relation::tests::extend::testOLAPAggStringWithPartitionAndOrderUnboundedWindow_MultipleExpressions_Function_1__Boolean_1_", "must be an aggregate expression or appear in GROUP BY clause"),
+ one("meta::pure::functions::relation::tests::extend::testOLAPAggStringWithPartitionAndOrderWindow_Function_1__Boolean_1_", "must be an aggregate expression or appear in GROUP BY clause"),
+ one("meta::pure::functions::relation::tests::extend::testOLAPAggStringWithPartitionAndOrderWindow_MultipleExpressions_Function_1__Boolean_1_", "must be an aggregate expression or appear in GROUP BY clause"),
+ one("meta::pure::functions::relation::tests::extend::testOLAPAggStringWithPartitionAndUnboundedWindow_Function_1__Boolean_1_", "must be an aggregate expression or appear in GROUP BY clause"),
+ one("meta::pure::functions::relation::tests::extend::testOLAPAggWithPartitionAndOrderUnboundedWindowMultipleColumns_Function_1__Boolean_1_", "must be an aggregate expression or appear in GROUP BY clause"),
+ one("meta::pure::functions::relation::tests::extend::testOLAPAggWithPartitionAndOrderUnboundedWindowMultipleColumns_MultipleExpressions_Function_1__Boolean_1_", "must be an aggregate expression or appear in GROUP BY clause"),
+ one("meta::pure::functions::relation::tests::extend::testOLAPAggWithPartitionAndOrderWindowMultipleColumns_Function_1__Boolean_1_", "must be an aggregate expression or appear in GROUP BY clause"),
+ one("meta::pure::functions::relation::tests::extend::testOLAPAggWithPartitionAndOrderWindowMultipleColumns_MultipleExpressions_Function_1__Boolean_1_", "must be an aggregate expression or appear in GROUP BY clause"),
+
+ //Extend float
+ one("meta::pure::functions::relation::tests::extend::testSimpleExtendFloat_Function_1__Boolean_1_", "\"\nexpected: '#TDS\n val,doub,name\n 1,1.2,2.2\n 3,2.3,3.3\n 4,4.2,5.2\n 5,4.2,5.2\n 6,4.5,5.5\n#'\nactual: '#TDS\n val,doub,name\n 1,1.2,2.200000047683716\n 3,2.3,3.299999952316284\n 4,4.2,5.199999809265137\n 5,4.2,5.199999809265137\n 6,4.5,5.5\n#'\""),
+ one("meta::pure::functions::relation::tests::extend::testSimpleExtendFloat_MultipleExpressions_Function_1__Boolean_1_", "\"\nexpected: '#TDS\n val,doub,name\n 1,1.2,2.2\n 3,2.3,3.3\n 4,4.2,5.2\n 5,4.2,5.2\n 6,4.5,5.5\n#'\nactual: '#TDS\n val,doub,name\n 1,1.2,2.200000047683716\n 3,2.3,3.299999952316284\n 4,4.2,5.199999809265137\n 5,4.2,5.199999809265137\n 6,4.5,5.5\n#'\""),
+
+ //Over
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_CurrentRow_NFollowing_WithSinglePartition_WithOrderByASC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_CurrentRow_NFollowing_WithSinglePartition_WithOrderByDESC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NFollowing_NFollowing_WithDifferentDurationUnits_WithSinglePartition_WithOrderByASC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NFollowing_NFollowing_WithDifferentDurationUnits_WithSinglePartition_WithOrderByDESC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NFollowing_NFollowing_WithSinglePartition_WithOrderByASC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NFollowing_NFollowing_WithSinglePartition_WithOrderByDESC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NFollowing_UnboundedFollowing_WithSinglePartition_WithOrderByASC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NFollowing_UnboundedFollowing_WithSinglePartition_WithOrderByDESC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NPreceding_CurrentRow_WithSinglePartition_WithOrderByASC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NPreceding_CurrentRow_WithSinglePartition_WithOrderByDESC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NPreceding_NFollowing_WithSinglePartition_WithOrderByASC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NPreceding_NFollowing_WithSinglePartition_WithOrderByDESC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NPreceding_NPreceding_WithSinglePartition_WithOrderByASC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NPreceding_NPreceding_WithSinglePartition_WithOrderByDESC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NPreceding_UnboundedFollowing_WithSinglePartition_WithOrderByASC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_NPreceding_UnboundedFollowing_WithSinglePartition_WithOrderByDESC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_UnboundedPreceding_NFollowing_WithSinglePartition_WithOrderByASC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_UnboundedPreceding_NFollowing_WithSinglePartition_WithOrderByDESC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_UnboundedPreceding_NPreceding_WithSinglePartition_WithOrderByASC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))"),
+ one("meta::pure::functions::relation::tests::over::testRangeInterval_UnboundedPreceding_NPreceding_WithSinglePartition_WithOrderByDESC_Function_1__Boolean_1_", "Window frame RANGE value type (integer) not compatible with sort item type (timestamp(3))")
+
+ );
+
+ public static Test suite()
+ {
+ return wrapSuite(
+ () -> true,
+ () -> PureTestBuilderCompiled.buildPCTTestSuite(reportScope, expectedFailures, adapter),
+ () -> false,
+ Lists.mutable.with((TestServerResource) TestConnectionIntegrationLoader.extensions().select(c -> c.getDatabaseType() == DatabaseType.Athena).getFirst())
+ );
+ }
+
+ @Override
+ public MutableList expectedFailures()
+ {
+ return expectedFailures;
+ }
+
+ @Override
+ public ReportScope getReportScope()
+ {
+ return reportScope;
+ }
+
+ @Override
+ public Adapter getAdapter()
+ {
+ return adapter;
+ }
+
+ @Override
+ public String getPlatform()
+ {
+ return platform;
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_StandardFunctions_PCT.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_StandardFunctions_PCT.java
new file mode 100644
index 00000000000..5d9c037af3d
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_StandardFunctions_PCT.java
@@ -0,0 +1,221 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct;
+
+import junit.framework.Test;
+import org.eclipse.collections.api.factory.Lists;
+import org.eclipse.collections.api.list.MutableList;
+import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.TestConnectionIntegrationLoader;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType;
+import org.finos.legend.engine.test.shared.framework.TestServerResource;
+import org.finos.legend.pure.code.core.CoreRelationalAthenaPCTCodeRepositoryProvider;
+import org.finos.legend.pure.code.core.CoreStandardFunctionsCodeRepositoryProvider;
+import org.finos.legend.pure.m3.pct.reports.config.PCTReportConfiguration;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.AdapterQualifier;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.ExclusionSpecification;
+import org.finos.legend.pure.m3.pct.reports.model.Adapter;
+import org.finos.legend.pure.m3.pct.shared.model.ReportScope;
+import org.finos.legend.pure.runtime.java.compiled.testHelper.PureTestBuilderCompiled;
+
+import static org.finos.legend.engine.test.shared.framework.PureTestHelperFramework.wrapSuite;
+
+public class Test_Relational_Athena_StandardFunctions_PCT extends PCTReportConfiguration
+{
+ private static final ReportScope reportScope = CoreStandardFunctionsCodeRepositoryProvider.standardFunctions;
+ private static final Adapter adapter = CoreRelationalAthenaPCTCodeRepositoryProvider.athenaAdapter;
+ private static final String platform = "compiled";
+ private static final MutableList expectedFailures = Lists.mutable.with(
+
+ //In
+ one("meta::pure::functions::collection::tests::in::testInNonPrimitive_Function_1__Boolean_1_", "\"Parameter to IN operation isn't a literal!\""),
+ one("meta::pure::functions::collection::tests::in::testInIsEmpty_Function_1__Boolean_1_", "NullPointer exception"),
+ one("meta::pure::functions::collection::tests::in::testInPrimitive_Function_1__Boolean_1_", "TYPE_MISMATCH: line 1:26: IN value and list items must be the same type or coercible to a common type. Cannot find common type between integer and varchar(1), all types (without duplicates): [integer, varchar(1), boolean, date]"),
+
+ //Bit And
+ one("meta::pure::functions::math::tests::bitAnd::testBitAnd_LargeNumbers_Function_1__Boolean_1_", "INVALID_CAST_ARGUMENT: Cannot cast '-9223372036854775808' to INT"),
+
+ //Bit Not
+ one("meta::pure::functions::math::tests::bitNot::testBitNot_LargeNumbers_Function_1__Boolean_1_", "INVALID_CAST_ARGUMENT: Cannot cast '-9223372036854775808' to INT"),
+
+ //Bit Or
+ one("meta::pure::functions::math::tests::bitOr::testBitOr_LargeNumbers_Function_1__Boolean_1_", "INVALID_CAST_ARGUMENT: Cannot cast '-9223372036854775808' to INT"),
+
+ //Bit Shift Left
+ one("meta::pure::functions::math::tests::bitShiftLeft::testBitShiftLeft_MoreThan62Bits_Function_1__Boolean_1_", "\"Execution error message mismatch.\nThe actual message was \"No error was thrown\"\nwhere the expected message was:\"Unsupported number of bits to shift - max bits allowed is 62\"\""),
+ one("meta::pure::functions::math::tests::bitShiftLeft::testBitShiftLeft_UpTo62Bits_Function_1__Boolean_1_", "\"\nexpected: 0\nactual: 70368744177664\""),
+
+ //Bit Shift Right
+ one("meta::pure::functions::math::tests::bitShiftRight::testBitShiftRight_MoreThan62Bits_Function_1__Boolean_1_", "\"Execution error message mismatch.\nThe actual message was \"No error was thrown\"\nwhere the expected message was:\"Unsupported number of bits to shift - max bits allowed is 62\"\""),
+
+ //Bit Xor
+ one("meta::pure::functions::math::tests::bitXor::testBitXor_LargeNumbers_Function_1__Boolean_1_", "INVALID_CAST_ARGUMENT: Cannot cast '-9223372036854775808' to INT"),
+
+ //Max
+ one("meta::pure::functions::math::tests::max::testMax_Numbers_Function_1__Boolean_1_", "\"\nexpected: 2\nactual: 2.0\""),
+
+ //Average (Average of lists is calculated wrongly)
+ one("meta::pure::functions::math::tests::average::testAverage_Floats_Function_1__Boolean_1_", "\"\nexpected: 3.8\nactual: 5.0\""),
+ one("meta::pure::functions::math::tests::average::testAverage_Integers_Function_1__Boolean_1_", "\"\nexpected: 3.8\nactual: 5.0\""),
+ one("meta::pure::functions::math::tests::average::testAverage_Numbers_Function_1__Boolean_1_", "\"\nexpected: 3.8\nactual: 5.0\""),
+
+ //Median
+ one("meta::pure::functions::math::tests::median::testMedian_Floats_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - percentile_cont\""),
+ one("meta::pure::functions::math::tests::median::testMedian_Floats_Relation_Aggregate_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - percentile_cont\""),
+ one("meta::pure::functions::math::tests::median::testMedian_Floats_Relation_Window_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - percentile_cont\""),
+ one("meta::pure::functions::math::tests::median::testMedian_Integers_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - percentile_cont\""),
+ one("meta::pure::functions::math::tests::median::testMedian_Integers_Relation_Aggregate_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - percentile_cont\""),
+ one("meta::pure::functions::math::tests::median::testMedian_Integers_Relation_Window_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - percentile_cont\""),
+ one("meta::pure::functions::math::tests::median::testMedian_Numbers_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - percentile_cont\""),
+ one("meta::pure::functions::math::tests::median::testMedian_Numbers_Relation_Aggregate_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - percentile_cont\""),
+ one("meta::pure::functions::math::tests::median::testMedian_Numbers_Relation_Window_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - percentile_cont\""),
+
+ //And
+ one("meta::pure::functions::collection::tests::and::testAnd_Function_1__Boolean_1_", "Can't find the packageable element 'andtrue'"),
+
+ //TimeBucket
+ one("meta::pure::functions::date::tests::timeBucket::dateTime::testTimeBucketDays_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - time_bucket\""),
+ one("meta::pure::functions::date::tests::timeBucket::dateTime::testTimeBucketHours_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - time_bucket\""),
+ one("meta::pure::functions::date::tests::timeBucket::dateTime::testTimeBucketMinutes_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - time_bucket\""),
+ one("meta::pure::functions::date::tests::timeBucket::dateTime::testTimeBucketMonths_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - time_bucket\""),
+ one("meta::pure::functions::date::tests::timeBucket::dateTime::testTimeBucketSeconds_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - time_bucket\""),
+ one("meta::pure::functions::date::tests::timeBucket::dateTime::testTimeBucketWeeks_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - time_bucket\""),
+ one("meta::pure::functions::date::tests::timeBucket::dateTime::testTimeBucketYears_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - time_bucket\""),
+ one("meta::pure::functions::date::tests::timeBucket::strictDate::testTimeBucketDays_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - time_bucket\""),
+ one("meta::pure::functions::date::tests::timeBucket::strictDate::testTimeBucketMonths_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - time_bucket\""),
+ one("meta::pure::functions::date::tests::timeBucket::strictDate::testTimeBucketWeeks_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - time_bucket\""),
+ one("meta::pure::functions::date::tests::timeBucket::strictDate::testTimeBucketYears_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - time_bucket\""),
+
+ //HashCode
+ one("meta::pure::functions::hashCode::tests::testHashCode_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for hashCode().\""),
+
+ //HashCodeAggregate
+ one("meta::pure::functions::math::hashCode::tests::testHashCodeAggregate_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for hashAgg().\""),
+
+ //Corr
+ one("meta::pure::functions::math::tests::corr::testCorr_Function_1__Boolean_1_", "\"No matched function in function registry for - corr(IntegerSqlType, IntegerSqlType, IntegerSqlType, IntegerSqlType).\nAvailable variations for that function - [\n corr(DoubleSqlType, DoubleSqlType):DoubleSqlType,\n corr(AbstractNumericSqlType, AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+
+ //CovarPopulation
+ one("meta::pure::functions::math::tests::covarPopulation::testCovarPopulation_Function_1__Boolean_1_", "\"No matched function in function registry for - covar_pop(IntegerSqlType, IntegerSqlType, IntegerSqlType, IntegerSqlType).\nAvailable variations for that function - [\n covar_pop(DoubleSqlType, DoubleSqlType):DoubleSqlType,\n covar_pop(AbstractNumericSqlType, AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+
+ //CovarSample
+ one("meta::pure::functions::math::tests::covarSample::testCovarSample_Function_1__Boolean_1_", "\"No matched function in function registry for - covar_samp(IntegerSqlType, IntegerSqlType, IntegerSqlType, IntegerSqlType).\nAvailable variations for that function - [\n covar_samp(DoubleSqlType, DoubleSqlType):DoubleSqlType,\n covar_samp(AbstractNumericSqlType, AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+
+ //Max
+ one("meta::pure::functions::math::tests::max::testMax_Floats_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\""),
+ one("meta::pure::functions::math::tests::max::testMax_Integers_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\""),
+
+ //MaxBy
+ one("meta::pure::functions::math::tests::maxBy::testMaxBy_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for maxBy().\""),
+ one("meta::pure::functions::math::tests::maxBy::testSimpleGroupByMaxBy_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for maxBy().\""),
+
+ //Min
+ one("meta::pure::functions::math::tests::min::testMin_Floats_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\""),
+ one("meta::pure::functions::math::tests::min::testMin_Integers_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\""),
+ one("meta::pure::functions::math::tests::min::testMin_Numbers_Function_1__Boolean_1_", "\"\nexpected: 1.23D\nactual: 1.23\""),
+ //MinBy
+ one("meta::pure::functions::math::tests::minBy::testMinBy_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for minBy().\""),
+ one("meta::pure::functions::math::tests::minBy::testSimpleGroupByMinBy_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for minBy().\""),
+
+ //Mode
+ one("meta::pure::functions::math::tests::mode::testMode_Float_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - mode\""),
+ one("meta::pure::functions::math::tests::mode::testMode_Floats_Relation_Aggregate_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - mode\""),
+ one("meta::pure::functions::math::tests::mode::testMode_Floats_Relation_Window_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - mode\""),
+ one("meta::pure::functions::math::tests::mode::testMode_Integer_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - mode\""),
+ one("meta::pure::functions::math::tests::mode::testMode_Integer_Relation_Aggregate_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - mode\""),
+ one("meta::pure::functions::math::tests::mode::testMode_Integer_Relation_Window_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - mode\""),
+ one("meta::pure::functions::math::tests::mode::testMode_Number_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - mode\""),
+ one("meta::pure::functions::math::tests::mode::testMode_Number_Relation_Aggregate_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - mode\""),
+ one("meta::pure::functions::math::tests::mode::testMode_Number_Relation_Window_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - mode\""),
+
+ //Percentile
+ one("meta::pure::functions::math::tests::percentile::testPercentile_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'range_Integer_1__Integer_1__Integer_1__Integer_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+
+ //StdDev
+ one("meta::pure::functions::math::tests::stdDev::testFloatStdDev_Function_1__Boolean_1_", "\"No matched function in function registry for - var_pop(DoubleSqlType, DoubleSqlType, DoubleSqlType, BooleanSqlType).\nAvailable variations for that function - [\n var_pop(DoubleSqlType):DoubleSqlType,\n var_pop(AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+ one("meta::pure::functions::math::tests::stdDev::testIntStdDev_Function_1__Boolean_1_", "\"No matched function in function registry for - var_pop(IntegerSqlType, IntegerSqlType, IntegerSqlType, BooleanSqlType).\nAvailable variations for that function - [\n var_pop(DoubleSqlType):DoubleSqlType,\n var_pop(AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+ one("meta::pure::functions::math::tests::stdDev::testMixedStdDev_Function_1__Boolean_1_", "\"No matched function in function registry for - var_pop(DoubleSqlType, IntegerSqlType, DoubleSqlType, BooleanSqlType).\nAvailable variations for that function - [\n var_pop(DoubleSqlType):DoubleSqlType,\n var_pop(AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+ one("meta::pure::functions::math::tests::stdDev::testNegativeNumberStdDev_Function_1__Boolean_1_", "\"No matched function in function registry for - var_pop(IntegerSqlType, IntegerSqlType, IntegerSqlType, BooleanSqlType).\nAvailable variations for that function - [\n var_pop(DoubleSqlType):DoubleSqlType,\n var_pop(AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+ one("meta::pure::functions::math::tests::stdDev::testPopulationStandardDeviation_Function_1__Boolean_1_", "\"No matched function in function registry for - var_pop(IntegerSqlType, IntegerSqlType, BooleanSqlType).\nAvailable variations for that function - [\n var_pop(DoubleSqlType):DoubleSqlType,\n var_pop(AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+
+ //Trigonometry
+ one("meta::pure::functions::math::tests::trigonometry::cosh::testCosH_EvalFuncSig_Function_1__Boolean_1_", "\"No matched function in function registry for - cosh(DoubleSqlType, DoubleSqlType).\nAvailable variations for that function - [\n cosh(AbstractNumericSqlType):DoubleSqlType\n]\""),
+ one("meta::pure::functions::math::tests::trigonometry::sinh::testSinH_EvalFuncSig_Function_1__Boolean_1_", "\"No matched function in function registry for - sinh(DoubleSqlType, DoubleSqlType).\nAvailable variations for that function - [\n sinh(AbstractNumericSqlType):DoubleSqlType\n]\""),
+ one("meta::pure::functions::math::tests::trigonometry::tanh::testTanH_EvalFuncSig_Function_1__Boolean_1_", "\"No matched function in function registry for - tanh(DoubleSqlType, DoubleSqlType).\nAvailable variations for that function - [\n tanh(AbstractNumericSqlType):DoubleSqlType\n]\""),
+
+ //Variance
+ one("meta::pure::functions::math::tests::variance::testVariancePopulation_Function_1__Boolean_1_", "\"No matched function in function registry for - var_pop(IntegerSqlType, IntegerSqlType).\nAvailable variations for that function - [\n var_pop(DoubleSqlType):DoubleSqlType,\n var_pop(AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+ one("meta::pure::functions::math::tests::variance::testVarianceSample_Function_1__Boolean_1_", "\"No matched function in function registry for - var_samp(DoubleSqlType, DoubleSqlType, DoubleSqlType).\nAvailable variations for that function - [\n var_samp(DoubleSqlType):DoubleSqlType,\n var_samp(AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+ one("meta::pure::functions::math::tests::variance::testVariance_Population_Function_1__Boolean_1_", "\"No matched function in function registry for - var_pop(IntegerSqlType, IntegerSqlType, BooleanSqlType).\nAvailable variations for that function - [\n var_pop(DoubleSqlType):DoubleSqlType,\n var_pop(AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+ one("meta::pure::functions::math::tests::variance::testVariance_Sample_Function_1__Boolean_1_", "\"No matched function in function registry for - var_pop(DoubleSqlType, DoubleSqlType, DoubleSqlType, BooleanSqlType).\nAvailable variations for that function - [\n var_pop(DoubleSqlType):DoubleSqlType,\n var_pop(AbstractNumericSqlType):AbstractNumericSqlType\n]\""),
+
+ //Collections Greatest
+ one("meta::pure::functions::collection::tests::greatest::testGreatest_DateTime_Function_1__Boolean_1_", "\"\nexpected: %2025-02-10T20:10:20+0000\nactual: %2025-02-10T20:10:20.000000000+0000\""),
+ one("meta::pure::functions::collection::tests::greatest::testGreatest_Number_Function_1__Boolean_1_", "\"\nexpected: 2\nactual: 2.0\""),
+ one("meta::pure::functions::collection::tests::greatest::testGreatest_Single_Function_1__Boolean_1_", "\"\nexpected: 1.0D\nactual: 1D\""),
+
+ //Collections Least
+ one("meta::pure::functions::collection::tests::least::testLeast_DateTime_Function_1__Boolean_1_", "\"\nexpected: %2025-01-10T15:25:30+0000\nactual: %2025-01-10T15:25:30.000000000+0000\""),
+ one("meta::pure::functions::collection::tests::least::testLeast_Number_Function_1__Boolean_1_", "\"\nexpected: 1.0D\nactual: 1.0\""),
+ one("meta::pure::functions::collection::tests::least::testLeast_Single_Function_1__Boolean_1_", "\"\nexpected: 1.0D\nactual: 1D\""),
+
+ //Collections Max
+ one("meta::pure::functions::collection::tests::max::testMax_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'tail_T_MANY__T_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+
+ //Collections Min
+ one("meta::pure::functions::collection::tests::min::testMin_Function_1__Boolean_1_", "\"No SQL translation exists for the PURE function 'tail_T_MANY__T_MANY_'. \nIf you would like to add a SQL translation for the function then follow the step-by-step guide on the PURE wiki.\""),
+
+ //Collections Or
+ one("meta::pure::functions::collection::tests::or::testOr_Function_1__Boolean_1_", "Can't find the packageable element 'ortrue'"),
+
+ //Percentile
+ one("meta::pure::functions::math::tests::percentile::testPercentile_Relation_Aggregate_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - percentile_disc\""),
+ one("meta::pure::functions::math::tests::percentile::testPercentile_Relation_Window_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - percentile_cont\"")
+
+ );
+
+ public static Test suite()
+ {
+ return wrapSuite(
+ () -> true,
+ () -> PureTestBuilderCompiled.buildPCTTestSuite(reportScope, expectedFailures, adapter),
+ () -> false,
+ Lists.mutable.with((TestServerResource) TestConnectionIntegrationLoader.extensions().select(c -> c.getDatabaseType() == DatabaseType.Athena).getFirst())
+ );
+ }
+
+ @Override
+ public MutableList expectedFailures()
+ {
+ return expectedFailures;
+ }
+
+ @Override
+ public ReportScope getReportScope()
+ {
+ return reportScope;
+ }
+
+ @Override
+ public Adapter getAdapter()
+ {
+ return adapter;
+ }
+
+ @Override
+ public String getPlatform()
+ {
+ return platform;
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_UnclassifiedFunctions_PCT.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_UnclassifiedFunctions_PCT.java
new file mode 100644
index 00000000000..5dda03ba3a4
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_UnclassifiedFunctions_PCT.java
@@ -0,0 +1,82 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct;
+
+import junit.framework.Test;
+import org.eclipse.collections.api.factory.Lists;
+import org.eclipse.collections.api.list.MutableList;
+import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.TestConnectionIntegrationLoader;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType;
+import org.finos.legend.engine.test.shared.framework.TestServerResource;
+import org.finos.legend.pure.code.core.CoreRelationalAthenaPCTCodeRepositoryProvider;
+import org.finos.legend.pure.code.core.CoreUnclassifiedFunctionsCodeRepositoryProvider;
+import org.finos.legend.pure.m3.pct.reports.config.PCTReportConfiguration;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.AdapterQualifier;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.ExclusionSpecification;
+import org.finos.legend.pure.m3.pct.reports.model.Adapter;
+import org.finos.legend.pure.m3.pct.shared.model.ReportScope;
+import org.finos.legend.pure.runtime.java.compiled.testHelper.PureTestBuilderCompiled;
+
+import static org.finos.legend.engine.test.shared.framework.PureTestHelperFramework.wrapSuite;
+
+public class Test_Relational_Athena_UnclassifiedFunctions_PCT extends PCTReportConfiguration
+{
+ private static final ReportScope reportScope = CoreUnclassifiedFunctionsCodeRepositoryProvider.unclassifiedFunctions;
+ private static final Adapter adapter = CoreRelationalAthenaPCTCodeRepositoryProvider.athenaAdapter;
+ private static final String platform = "compiled";
+ private static final MutableList expectedFailures = Lists.mutable.with(
+
+ //Ascii
+ one("meta::pure::functions::string::tests::ascii::testAsciiNewline_Function_1__Boolean_1_", "Unexpected token"),
+
+ //Jarowinkler Similarity
+ one("meta::pure::functions::string::tests::jaroWinklerSimilarity::testJaroWinklerSimilarityEqual_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - jarowinkler_similarity\""),
+ one("meta::pure::functions::string::tests::jaroWinklerSimilarity::testJaroWinklerSimilarityNotEqual_Function_1__Boolean_1_", "\"Athena SQL Dialect does not support the function - jarowinkler_similarity\"")
+ );
+
+ public static Test suite()
+ {
+ return wrapSuite(
+ () -> true,
+ () -> PureTestBuilderCompiled.buildPCTTestSuite(reportScope, expectedFailures, adapter),
+ () -> false,
+ Lists.mutable.with((TestServerResource) TestConnectionIntegrationLoader.extensions().select(c -> c.getDatabaseType() == DatabaseType.Athena).getFirst())
+ );
+ }
+
+ @Override
+ public MutableList expectedFailures()
+ {
+ return expectedFailures;
+ }
+
+ @Override
+ public ReportScope getReportScope()
+ {
+ return reportScope;
+ }
+
+ @Override
+ public Adapter getAdapter()
+ {
+ return adapter;
+ }
+
+ @Override
+ public String getPlatform()
+ {
+ return platform;
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_VariantFunctions_PCT.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_VariantFunctions_PCT.java
new file mode 100644
index 00000000000..2b2a265edf1
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/athena/pct/Test_Relational_Athena_VariantFunctions_PCT.java
@@ -0,0 +1,127 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+package org.finos.legend.engine.plan.execution.stores.relational.test.athena.pct;
+
+import junit.framework.Test;
+import org.eclipse.collections.api.factory.Lists;
+import org.eclipse.collections.api.list.MutableList;
+import org.finos.legend.engine.plan.execution.stores.relational.connection.tests.api.TestConnectionIntegrationLoader;
+import org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.connection.DatabaseType;
+import org.finos.legend.engine.test.shared.framework.TestServerResource;
+import org.finos.legend.pure.code.core.CoreRelationalAthenaPCTCodeRepositoryProvider;
+import org.finos.legend.pure.m3.PlatformCodeRepositoryProvider;
+import org.finos.legend.pure.m3.pct.reports.config.PCTReportConfiguration;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.AdapterQualifier;
+import org.finos.legend.pure.m3.pct.reports.config.exclusion.ExclusionSpecification;
+import org.finos.legend.pure.m3.pct.reports.model.Adapter;
+import org.finos.legend.pure.m3.pct.shared.model.ReportScope;
+import org.finos.legend.pure.runtime.java.compiled.testHelper.PureTestBuilderCompiled;
+
+import static org.finos.legend.engine.test.shared.framework.PureTestHelperFramework.wrapSuite;
+
+public class Test_Relational_Athena_VariantFunctions_PCT extends PCTReportConfiguration
+{
+ private static final ReportScope reportScope = PlatformCodeRepositoryProvider.variantFunctions;
+ private static final Adapter adapter = CoreRelationalAthenaPCTCodeRepositoryProvider.athenaAdapter;
+ private static final String platform = "compiled";
+ private static final MutableList expectedFailures = Lists.mutable.with(
+
+ //Variant
+ one("meta::pure::functions::variant::convert::tests::to::testToBooleanFalse_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToBooleanFromBadString_Function_1__Boolean_1_", "\"Execution error message mismatch.\nThe actual message was \"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\"\nwhere the expected message was:\"Invalid Pure Boolean: 'hello'\"\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToBooleanFromString_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToBooleanTrue_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToDateTimeFromWrongString_Function_1__Boolean_1_", "\"Execution error message mismatch.\nThe actual message was \"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\"\nwhere the expected message was:\"DateTime must include time information, got: 2020-01-01\"\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToDateTime_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToFloatFromInteger_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToFloatFromString_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToFloat_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToIntegerFromFloat_Function_1__Boolean_1_", "\"Execution error message mismatch.\nThe actual message was \"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\"\nwhere the expected message was:\"Variant of type 'NUMBER' cannot be converted to Integer\"\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToIntegerFromStringFloat_Function_1__Boolean_1_", "\"Execution error message mismatch.\nThe actual message was \"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\"\nwhere the expected message was:\"For input string: \"1.25\"\"\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToIntegerFromString_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToInteger_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToListFromNonArrayVariant_Function_1__Boolean_1_", "\"Execution error message mismatch.\nThe actual message was \"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\"\nwhere the expected message was:\"Variant of type 'STRING' cannot be converted to List\"\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToListOfIntegers_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToListOfVariants_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToMapFromNonObjectVariant_Function_1__Boolean_1_", "\"Execution error message mismatch.\nThe actual message was \"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\"\nwhere the expected message was:\"Variant of type 'STRING' cannot be converted to Map\"\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToMapWithIntegerValue_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToMapWithVariantValues_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToNull_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToStrictDateFromWrongString_Function_1__Boolean_1_", "\"Execution error message mismatch.\nThe actual message was \"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\"\nwhere the expected message was:\"StrictDate must be a calendar day, got: 2020\"\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToStrictDate_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToStringFromBoolean_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToStringFromNumber_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::to::testToString_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::toJson::testObjectToJson_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toJson().\""),
+ one("meta::pure::functions::variant::convert::tests::toMany::testToManyFromNonArray_Function_1__Boolean_1_", "\"Execution error message mismatch.\nThe actual message was \"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\"\nwhere the expected message was:\"Expect variant that contains an 'ARRAY', but got 'STRING'\"\""),
+ one("meta::pure::functions::variant::convert::tests::toMany::testToManyInteger_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::toMany::testToManyVariant_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testEmpty_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariant().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testFloat_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariant().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testFloats_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testInteger_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariant().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testIntegers_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testListOfList_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testListOfMap_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testListOfPrimitives_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testListOfVariants_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariant().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testMapOfMap_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testMapOfVariantValues_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariant().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testMapWithMultipleKeys_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testMapWithPrimitiveValues_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantObject().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testString_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariant().\""),
+ one("meta::pure::functions::variant::convert::tests::toVariant::testStrings_Function_1__Boolean_1_", "\"Couldn't find DynaFunction to Postgres model translation for toVariantList().\""),
+ one("meta::pure::functions::variant::navigation::tests::get::testGetFromArray_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::navigation::tests::get::testGetFromObjectWhenKeyDoesNotExists_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::navigation::tests::get::testGetFromObjectWhenKeyExists_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\""),
+ one("meta::pure::functions::variant::navigation::tests::get::testGetFromZeroMultiplicityObject_Function_1__Boolean_1_", "\"Match failure: DataTypeInfoObject instanceOf DataTypeInfo\"")
+
+ );
+
+ public static Test suite()
+ {
+ return wrapSuite(
+ () -> true,
+ () -> PureTestBuilderCompiled.buildPCTTestSuite(reportScope, expectedFailures, adapter),
+ () -> false,
+ Lists.mutable.with((TestServerResource) TestConnectionIntegrationLoader.extensions().select(c -> c.getDatabaseType() == DatabaseType.Athena).getFirst())
+ );
+ }
+
+ @Override
+ public MutableList expectedFailures()
+ {
+ return expectedFailures;
+ }
+
+ @Override
+ public ReportScope getReportScope()
+ {
+ return reportScope;
+ }
+
+ @Override
+ public Adapter getAdapter()
+ {
+ return adapter;
+ }
+
+ @Override
+ public String getPlatform()
+ {
+ return platform;
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-SDT/pom.xml b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-SDT/pom.xml
new file mode 100644
index 00000000000..9f207ed6079
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-SDT/pom.xml
@@ -0,0 +1,73 @@
+
+
+
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena
+ 4.101.3-SNAPSHOT
+
+ 4.0.0
+
+ legend-engine-xt-relationalStore-athena-SDT
+ jar
+ Legend Engine - XT - Relational Store - Athena - SDT
+
+
+
+
+ junit
+ junit
+ test
+
+
+ org.finos.legend.pure
+ legend-pure-runtime-java-engine-compiled
+ test
+
+
+ org.eclipse.collections
+ eclipse-collections-api
+ test
+
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-SDT-pure
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-SDT-pure
+ test-jar
+ ${project.version}
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-PCT
+ test
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure
+ ${project.version}
+ test
+
+
+
+
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-SDT/src/test/java/org/finos/legend/engine/relational/sdt/athena/Test_Athena_SDT.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-SDT/src/test/java/org/finos/legend/engine/relational/sdt/athena/Test_Athena_SDT.java
new file mode 100644
index 00000000000..4ec4c89e69e
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-SDT/src/test/java/org/finos/legend/engine/relational/sdt/athena/Test_Athena_SDT.java
@@ -0,0 +1,33 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.engine.relational.sdt.athena;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.eclipse.collections.api.factory.Lists;
+import org.finos.legend.engine.relational.test.sdt.SdtTestSuiteBuilder;
+
+import static org.finos.legend.pure.generated.core_external_store_relational_sql_dialect_translation_athena_athenaSqlDialect.Root_meta_external_store_relational_sqlDialectTranslation_athena_athenaSqlDialectExtension__Extension_1_;
+
+public class Test_Athena_SDT extends TestSuite
+{
+ public static Test suite()
+ {
+ return SdtTestSuiteBuilder.buildSdtTestSuite(
+ "Athena",
+ es -> Lists.immutable.of(Root_meta_external_store_relational_sqlDialectTranslation_athena_athenaSqlDialectExtension__Extension_1_(es))
+ );
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/pom.xml b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/pom.xml
index be9b39f2743..448255624eb 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/pom.xml
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/pom.xml
@@ -27,6 +27,28 @@
jarLegend Engine - XT - Relational Store - Athena - Execution
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ dependency-analyze
+
+ analyze-only
+
+
+
+ com.amazon.athena:AthenaJDBC42:jar:2.1.5.1000
+
+
+
+
+
+
+
+
org.finos.legend.engine
@@ -72,13 +94,25 @@
-
-
-
-
-
-
-
-
+
+
+
+ pct-cloud-test-athena
+
+
+ com.amazon.athena
+ AthenaJDBC42
+ 2.1.5.1000
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+
+
+
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/AthenaConnectionExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/AthenaConnectionExtension.java
index 5cecd7a9570..5330cd7fbac 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/AthenaConnectionExtension.java
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-execution/src/main/java/org/finos/legend/engine/plan/execution/stores/relational/AthenaConnectionExtension.java
@@ -78,7 +78,8 @@ public Function T accept(DatasourceSpecificationVisitor datasourceSpecificationVisitor)
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/connection/metamodel.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/connection/metamodel.pure
index 3d5185442bd..d939b065ca2 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/connection/metamodel.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/connection/metamodel.pure
@@ -17,4 +17,5 @@ Class meta::pure::alloy::connections::alloy::specification::AthenaDatasourceSpec
<> awsRegion: String[1];
<> s3OutputLocation: String[1];
<> databaseName: String[1];
-}
+ <> workgroup: String[0..1];
+}
\ No newline at end of file
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/v1_33_0/extension/extension_athena.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/v1_33_0/extension/extension_athena.pure
index d37362b5a9a..684ab751891 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/v1_33_0/extension/extension_athena.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/v1_33_0/extension/extension_athena.pure
@@ -25,7 +25,8 @@ meta::protocols::pure::v1_33_0::transformation::fromPureGraph::connection::athen
_type = 'athena',
awsRegion = $s.awsRegion,
s3OutputLocation = $s.s3OutputLocation,
- databaseName = $s.databaseName
+ databaseName = $s.databaseName,
+ workgroup = $s.workgroup
)
],
reverse_transfers_typeLookups = [
@@ -38,7 +39,8 @@ meta::protocols::pure::v1_33_0::transformation::fromPureGraph::connection::athen
^meta::pure::alloy::connections::alloy::specification::AthenaDatasourceSpecification(
awsRegion = $s.awsRegion,
s3OutputLocation = $s.s3OutputLocation,
- databaseName = $s.databaseName
+ databaseName = $s.databaseName,
+ workgroup = $s.workgroup
)
]
)
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/v1_33_0/model/metamodel_connection.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/v1_33_0/model/metamodel_connection.pure
index ee4e82783a1..dd0c8d4fef1 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/v1_33_0/model/metamodel_connection.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/v1_33_0/model/metamodel_connection.pure
@@ -17,4 +17,7 @@ Class meta::protocols::pure::v1_33_0::metamodel::store::relational::connection::
awsRegion: String[1];
s3OutputLocation: String[1];
databaseName: String[1];
+ workgroup: String[0..1];
}
+
+
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/vX_X_X/extension/extension_athena.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/vX_X_X/extension/extension_athena.pure
index 38cd0c222bf..c507d3f9ac3 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/vX_X_X/extension/extension_athena.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/vX_X_X/extension/extension_athena.pure
@@ -25,7 +25,8 @@ meta::protocols::pure::vX_X_X::transformation::fromPureGraph::connection::athena
_type = 'athena',
awsRegion = $s.awsRegion,
s3OutputLocation = $s.s3OutputLocation,
- databaseName = $s.databaseName
+ databaseName = $s.databaseName,
+ workgroup = $s.workgroup
)
],
reverse_transfers_typeLookups = [
@@ -38,7 +39,8 @@ meta::protocols::pure::vX_X_X::transformation::fromPureGraph::connection::athena
^meta::pure::alloy::connections::alloy::specification::AthenaDatasourceSpecification(
awsRegion = $s.awsRegion,
s3OutputLocation = $s.s3OutputLocation,
- databaseName = $s.databaseName
+ databaseName = $s.databaseName,
+ workgroup = $s.workgroup
)
]
)
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/vX_X_X/model/metamodel_connection.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/vX_X_X/model/metamodel_connection.pure
index c6c1fb5a28c..5db5b32d781 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/vX_X_X/model/metamodel_connection.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/protocols/pure/vX_X_X/model/metamodel_connection.pure
@@ -17,4 +17,7 @@ Class meta::protocols::pure::vX_X_X::metamodel::store::relational::connection::a
awsRegion: String[1];
s3OutputLocation: String[1];
databaseName: String[1];
+ workgroup: String[0..1];
}
+
+
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/sqlQueryToString/athenaExtension.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/sqlQueryToString/athenaExtension.pure
index 22de5339dfe..01a7b885b91 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/sqlQueryToString/athenaExtension.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-pure/src/main/resources/core_relational_athena/relational/sqlQueryToString/athenaExtension.pure
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+import meta::relational::functions::pureToSqlQuery::*;
import meta::relational::functions::sqlQueryToString::athena::*;
import meta::relational::functions::sqlQueryToString::default::*;
import meta::relational::functions::sqlQueryToString::*;
@@ -67,7 +68,7 @@ function <> meta::relational::functions::sqlQueryToString::athen
function <> meta::relational::functions::sqlQueryToString::athena::translateCreateSchemaStatementForAthena(createSchemaSQL:CreateSchemaSQL[1], dbConfig:DbConfig[1]) : String[*]
{
- if($createSchemaSQL.schema.name == 'default', |[], |'[Create Schema ' + $createSchemaSQL.schema.name + ';]');
+ if($createSchemaSQL.schema.name == 'default', |[], |'Create Schema ' + $createSchemaSQL.schema.name);
}
function <> meta::relational::functions::sqlQueryToString::athena::translateDropSchemaStatementForAthena(dropSchemaSQL:DropSchemaSQL[1], dbConfig:DbConfig[1]) : String[*]
@@ -88,12 +89,19 @@ function <> meta::relational::functions::sqlQueryToString::athen
let currentTimeKey = now()->toString()->chunk(1)->filter(x | $x->matches('[0-9]'))->makeString();
let tableKey = $tableName->chunk(1)->filter(x | $x->matches('[a-zA-Z0-9]'))->makeString();
let tableLocationKey = $tableKey + $currentTimeKey;
+
'Create External Table '+ $tableName +
+ '('
+ $t.columns->cast(@meta::relational::metamodel::Column)
- ->map(c | $c.name->processColumnName($dbConfig) + ' ' + getColumnTypeSqlTextForAthena($c.type))
+ ->map(c | let colName = $c.name->processColumnName($dbConfig);
+ let colType = getColumnTypeSqlTextForAthena($c.type);
+ if ($colType->toLower() == 'semistructured',
+ | fail('Athena does not support type - semistructured'); '';,
+ | $colName + ' ' + $colType
+ )->toString();
+ )
->joinStrings(',')
- +') Location \'s3://aws-athena-query-results-finos/' + $tableLocationKey + '/\';';
+ +') Location \'s3://legend-athena-query-results/' + $tableLocationKey + '/\';';
}
function <> meta::relational::functions::sqlQueryToString::athena::getColumnTypeSqlTextForAthena(columnType:meta::relational::metamodel::datatype::DataType[1]):String[1]
@@ -120,7 +128,10 @@ function <> meta::relational::functions::sqlQueryToString::athen
let literalStr = $strs->at($x)->meta::relational::functions::database::testDataSQLgeneration::convertValuesToCsv($types->at($x));
$types->at($x)->match([
d:meta::relational::metamodel::datatype::Date[1] | 'Date ' + $literalStr,
- t:meta::relational::metamodel::datatype::Timestamp[1] | 'Timestamp ' + $literalStr,
+ t:meta::relational::metamodel::datatype::Timestamp[1] | if ($literalStr->matches('\'\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?\''),
+ | 'Timestamp ' + $literalStr->split('T')->at(0) + ' ' + $literalStr->split('T')->at(1),
+ | 'Timestamp ' + $literalStr
+ ),
a:Any[1] | $literalStr
]);)->makeString(', ');
}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/pom.xml b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/pom.xml
new file mode 100644
index 00000000000..3090cb457f9
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/pom.xml
@@ -0,0 +1,183 @@
+
+
+
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena
+ 4.101.3-SNAPSHOT
+
+ 4.0.0
+
+ legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure
+ jar
+ Legend Engine - XT - Relational Store - Athena - SQL Dialect Translation - Pure
+
+
+
+
+ org.finos.legend.pure
+ legend-pure-maven-generation-par
+
+ ${project.basedir}/src/main/resources
+ ${legend.pure.version}
+
+ core_external_store_relational_sql_dialect_translation_athena
+
+
+ ${project.basedir}/src/main/resources/core_external_store_relational_sql_dialect_translation_athena.definition.json
+
+
+
+
+ generate-sources
+
+ build-pure-jar
+
+
+
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-sqlDialectTranslation-pure
+ ${project.version}
+
+
+ org.finos.legend.pure
+ legend-pure-m2-dsl-diagram-grammar
+ ${legend.pure.version}
+
+
+
+
+ org.finos.legend.pure
+ legend-pure-maven-generation-java
+
+
+ compile
+
+ build-pure-compiled-jar
+
+
+ true
+ true
+ modular
+ true
+
+ core_external_store_relational_sql_dialect_translation_athena
+
+
+
+
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-sqlDialectTranslation-pure
+ ${project.version}
+
+
+ org.finos.legend.pure
+ legend-pure-m2-dsl-diagram-grammar
+ ${legend.pure.version}
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ dependency-analyze
+
+
+
+ org.finos.legend.engine:legend-engine-pure-code-core-extension
+ org.finos.legend.engine:legend-engine-xt-relationalStore-postgresSqlModel-extensions-pure
+ org.finos.legend.engine:legend-engine-pure-code-compiled-core
+ org.finos.legend.engine:legend-engine-xt-relationalStore-postgresSqlModel-pure
+
+
+
+
+
+
+
+
+
+
+
+ org.finos.legend.pure
+ legend-pure-m4
+
+
+ org.finos.legend.pure
+ legend-pure-m3-core
+
+
+ org.finos.legend.pure
+ legend-pure-runtime-java-engine-compiled
+
+
+
+
+
+ org.finos.legend.engine
+ legend-engine-pure-platform-java
+
+
+ org.finos.legend.engine
+ legend-engine-pure-code-compiled-core
+
+
+ org.finos.legend.engine
+ legend-engine-pure-code-core-extension
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-postgresSqlModel-pure
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-postgresSqlModel-extensions-pure
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-sqlDialectTranslation-pure
+
+
+ org.finos.legend.engine
+ legend-engine-pure-runtime-java-extension-compiled-functions-unclassified
+
+
+
+
+ org.eclipse.collections
+ eclipse-collections
+
+
+ org.eclipse.collections
+ eclipse-collections-api
+
+
+
+
+ junit
+ junit
+
+
+
+
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/java/org/finos/legend/pure/code/core/AthenaSqlDialectTranslationPureCoreExtension.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/java/org/finos/legend/pure/code/core/AthenaSqlDialectTranslationPureCoreExtension.java
new file mode 100644
index 00000000000..29d33d3cc58
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/java/org/finos/legend/pure/code/core/AthenaSqlDialectTranslationPureCoreExtension.java
@@ -0,0 +1,38 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.pure.code.core;
+
+import org.eclipse.collections.api.list.MutableList;
+
+public class AthenaSqlDialectTranslationPureCoreExtension implements SqlDialectTranslationPureCoreExtension
+{
+ @Override
+ public String functionFile()
+ {
+ return "core_external_store_relational_sql_dialect_translation_athena/athenaSqlDialect.pure";
+ }
+
+ @Override
+ public String functionSignature()
+ {
+ return "meta::external::store::relational::sqlDialectTranslation::athena::athenaSqlDialectExtension__Extension_1_";
+ }
+
+ @Override
+ public MutableList group()
+ {
+ return org.eclipse.collections.impl.factory.Lists.mutable.with("Store", "Relational", "Athena");
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/java/org/finos/legend/pure/code/core/CoreExternalStoreRelationalSqlDialectTranslationAthenaCodeRepositoryProvider.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/java/org/finos/legend/pure/code/core/CoreExternalStoreRelationalSqlDialectTranslationAthenaCodeRepositoryProvider.java
new file mode 100644
index 00000000000..00483cc0d61
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/java/org/finos/legend/pure/code/core/CoreExternalStoreRelationalSqlDialectTranslationAthenaCodeRepositoryProvider.java
@@ -0,0 +1,29 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.pure.code.core;
+
+import org.finos.legend.pure.m3.serialization.filesystem.repository.CodeRepository;
+import org.finos.legend.pure.m3.serialization.filesystem.repository.CodeRepositoryProvider;
+import org.finos.legend.pure.m3.serialization.filesystem.repository.GenericCodeRepository;
+
+public class CoreExternalStoreRelationalSqlDialectTranslationAthenaCodeRepositoryProvider implements CodeRepositoryProvider
+{
+ @Override
+ public CodeRepository repository()
+ {
+ return GenericCodeRepository.build("core_external_store_relational_sql_dialect_translation_athena.definition.json");
+ }
+}
+
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/META-INF/services/org.finos.legend.engine.pure.code.core.LegendPureCoreExtension b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/META-INF/services/org.finos.legend.engine.pure.code.core.LegendPureCoreExtension
new file mode 100644
index 00000000000..9c438885381
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/META-INF/services/org.finos.legend.engine.pure.code.core.LegendPureCoreExtension
@@ -0,0 +1 @@
+org.finos.legend.pure.code.core.AthenaSqlDialectTranslationPureCoreExtension
\ No newline at end of file
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/META-INF/services/org.finos.legend.pure.m3.serialization.filesystem.repository.CodeRepositoryProvider b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/META-INF/services/org.finos.legend.pure.m3.serialization.filesystem.repository.CodeRepositoryProvider
new file mode 100644
index 00000000000..cfd3d26e0ba
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/META-INF/services/org.finos.legend.pure.m3.serialization.filesystem.repository.CodeRepositoryProvider
@@ -0,0 +1 @@
+org.finos.legend.pure.code.core.CoreExternalStoreRelationalSqlDialectTranslationAthenaCodeRepositoryProvider
\ No newline at end of file
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation_athena.definition.json b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation_athena.definition.json
new file mode 100644
index 00000000000..4532fe3302b
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation_athena.definition.json
@@ -0,0 +1,13 @@
+{
+ "name": "core_external_store_relational_sql_dialect_translation_athena",
+ "pattern": "(meta::external::store::relational::sqlDialectTranslation::athena)(::.*)?",
+ "dependencies": [
+ "platform",
+ "core_functions_standard",
+ "core_functions_unclassified",
+ "core",
+ "core_external_store_relational_postgres_sql_model",
+ "core_external_store_relational_postgres_sql_model_extensions",
+ "core_external_store_relational_sql_dialect_translation"
+ ]
+}
\ No newline at end of file
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation_athena/athenaSqlDialect.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation_athena/athenaSqlDialect.pure
new file mode 100644
index 00000000000..0cb2885b8a6
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation_athena/athenaSqlDialect.pure
@@ -0,0 +1,1059 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::extensionFunctions::window::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::extensionFunctions::misc::*;
+import meta::external::query::sql::metamodel::extension::tests::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::boolean::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::extensionFunctions::temporal::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::extensionFunctions::string::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::misc::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::temporal::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::window::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::extensionFunctions::temporal::*;
+import meta::external::query::sql::metamodel::*;
+import meta::external::store::relational::sqlDialectTranslation::*;
+import meta::external::store::relational::sqlDialectTranslation::defaults::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::aggregate::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::numeric::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::numeric::aggregate::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::string::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::string::aggregate::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::boolean::aggregate::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::conditional::*;
+import meta::external::store::relational::sqlDialectTranslation::functionRegistry::extensionFunctions::numeric::*;
+import meta::external::store::relational::sqlDialectTranslation::athena::*;
+import meta::external::store::relational::sqlDialectTranslation::sqlTyping::typeInference::*;
+import meta::external::store::relational::sqlDialectTranslation::utils::*;
+import meta::pure::extension::*;
+import meta::external::query::sql::metamodel::extension::*;
+
+function meta::external::store::relational::sqlDialectTranslation::athena::athenaSqlDialect(): SqlDialect[1]
+{
+ ^SqlDialect
+ (
+ dbType = 'Athena',
+ identifierQuoteConfig = athenaIdentifierQuoteConfiguration(),
+ literalQuoteConfig = athenaLiteralQuoteConfiguration(),
+ nodeProcessors = athenaDialectNodeProcessors(),
+ identifierProcessor = athenaIdentifierProcessor(),
+ expressionPrecedenceComparator = athenaExpressionPrecedenceComparator(),
+ keywords = athenaKeywords(),
+ functionProcessorMap = athenaFunctionProcessorMap(),
+ variablePlaceholderPrefixSuffixMap = athenaVariablePlaceholderPrefixSuffixMap(),
+ expectedSqlDialectTestErrors = athenaFunctionTestsExpectedErrors()
+ )
+}
+
+function meta::external::store::relational::sqlDialectTranslation::athena::athenaSqlDialectExtension(): Extension[1]
+{
+ ^Extension
+ (
+ type = 'AthenaSqlDialectExtension',
+ moduleExtensions = [
+ ^SqlDialectTranslationModuleExtension
+ (
+ module = sqlDialectTranslationModuleExtensionName(),
+ extraSqlDialects = athenaSqlDialect()
+ )
+ ]
+ )
+}
+
+function meta::external::store::relational::sqlDialectTranslation::athena::athenaFunctionTestsExpectedErrors(): Map[1]
+{
+ [
+ pair(
+ 'FuncTests - corr(0/0)',
+ 'Expected - {"columnNames":["result"],"rows":[{"values":[0.52164053]}]}\n' +
+ 'Actual - {"columnNames":["result"],"rows":[{"values":[0.52164054]}]}'
+ ),
+ pair(
+ 'FuncTests - covar_samp(0/0)',
+ 'Expected - {"columnNames":["result"],"rows":[{"values":[66.66666667]}]}\n' +
+ 'Actual - {"columnNames":["result"],"rows":[{"values":[66.66666412]}]}'
+ ),
+ pair('FuncTests - percentile_cont(0/0)', 'Athena SQL Dialect does not support the function - percentile_cont'),
+ pair('FuncTests - percentile_disc(0/0)', 'Athena SQL Dialect does not support the function - percentile_disc'),
+ pair('FuncTests - jarowinkler_similarity(0/2)', 'Athena SQL Dialect does not support the function - jarowinkler_similarity'),
+ pair('FuncTests - jarowinkler_similarity(1/2)', 'Athena SQL Dialect does not support the function - jarowinkler_similarity'),
+ pair('FuncTests - jarowinkler_similarity(2/2)', 'Athena SQL Dialect does not support the function - jarowinkler_similarity'),
+ pair(
+ 'FuncTests - parseJson(0/0)',
+ 'Expected - {"columnNames":["result"],"rows":[{"values":["{\\n \\\"foo\\\": \\\"bar\\\"\\n}"]}]}\n' +
+ 'Actual - {"columnNames":["result"],"rows":[{"values":["{\"foo\":\"bar\"}"]}]}"'
+ ),
+ pair('FuncTests - mode(0/1)','Athena SQL Dialect does not support the function - mode'),
+ pair('FuncTests - mode(1/1)', 'Athena SQL Dialect does not support the function - mode'),
+ pair('FuncTests - dateadd(1/3)', 'Athena SQL Dialect does not support adding microsecond to date'),
+ pair('FuncTests - time_bucket(0/1)', 'Athena SQL Dialect does not support the function - time_bucket'),
+ pair('FuncTests - time_bucket(1/1)', 'Athena SQL Dialect does not support the function - time_bucket'),
+ pair('SQLStructureTests - Qualify', 'Athena SQL Dialect does not support Qualify!'),
+ pair('SQLStructureTests - AsOfJoin', 'Athena SQL Dialect does not support AsOfJoin!')
+ ]->newMap()->cast(@Map)
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaIdentifierQuoteConfiguration(): QuoteConfiguration[1]
+{
+ ^QuoteConfiguration
+ (
+ start = '"',
+ end = '"',
+ escape = '""'
+ )
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaChangeQuoteIndentifierForCreateStatement(identifier: String[1]): String[1]
+{
+ let unquotedIdentifier = if($identifier->startsWith('"') && $identifier->endsWith('"'), | '`' + $identifier->substring(1, $identifier->length()-1)->replace('`', '`') + '`', | $identifier->replace('`', '`'));
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaLiteralQuoteConfiguration(): QuoteConfiguration[1]
+{
+ ^QuoteConfiguration
+ (
+ start = '\'',
+ end = '\'',
+ escape = '\'\''
+ )
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaDialectNodeProcessors(): Map, NodeProcessor>[1]
+{
+ newMap(
+ athenaDialectStatementProcessors()
+ ->concatenate(
+ athenaDialectRelationProcessors()
+ )
+ ->concatenate(
+ athenaDialectExpressionProcessors()
+ )
+ ->concatenate(
+ athenaDialectLiteralProcessors()
+ )
+ ->concatenate(
+ athenaDialectSelectItemProcessors()
+ )
+ ->concatenate(
+ athenaDialectOtherNodeProcessors()
+ )
+ ->concatenate(
+ athenaDialectDDLProcessors()
+ )
+ ->map(n | pair($n.nodeType, $n))
+ )
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaDialectStatementProcessors(): NodeProcessor[*]
+{
+ [
+ queryProcessor_default(),
+ windowProcessor_default()
+ ]
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaDialectRelationProcessors(): NodeProcessor[*]
+{
+ [
+ tableProcessor_default(),
+ aliasedRelationProcessor_default(),
+ joinProcessor_default(),
+ asOfJoinProcessorForAthena(),
+ querySpecificationProcessor_athena(),
+ unionProcessor_default(),
+ tableSubqueryProcessor_default(),
+ tablePlaceholderProcessor_default(),
+ extendedQuerySpecificationProcessor_athena()
+ ]
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaDialectExpressionProcessors(): NodeProcessor[*]
+{
+ [
+ comparisonExpressionNodeProcessor_default(),
+ logicalBinaryExpressionNodeProcessor_default(),
+ notExpressionNodeProcessor_default(),
+ arithmeticExpressionNodeProcessor_default(),
+ qualifiedNameReferenceNodeProcessor_default(),
+ isNullPredicateNodeProcessor_default(),
+ isNotNullPredicateNodeProcessor_default(),
+ negativeNodeProcessor_default(),
+ currentTimeNodeProcessor_default(),
+ whenClauseNodeProcessor_default(),
+ searchedCaseExpressionNodeProcessor_default(),
+ columnTypeProcessor_default(),
+ castProcessorForAthena(),
+ inListExpressionProcessor_default(),
+ inPredicateProcessor_default(),
+ existsPredicateProcessor_default(),
+ extractProcessor_default(),
+ betweenPredicateProcessor_default(),
+ functionCallProcessor_default(),
+ subQueryExpressionProcessor_default(),
+ trimProcessor_default(),
+ likePredicateProcessor_athena(),
+ allColumnsReferenceNodeProcessor_default(),
+ inClauseVariablePlaceholderProcessor_default(),
+ variablePlaceholderProcessor_default(),
+ freeMarkerOperationProcessor_default(),
+ bitwiseBinaryExpressionNodeProcessorForAthena(),
+ bitwiseNotExpressionNodeProcessorForAthena(),
+ bitwiseShiftExpressionNodeProcessorForAthena()
+ ]
+}
+
+function meta::external::store::relational::sqlDialectTranslation::athena::likePredicateProcessor_athena(): NodeProcessor[1]
+{
+ nodeProcessor(
+ LikePredicate,
+ {sqlDialect, l, state, config |
+ if($l.ignoreCase,
+ | 'lower' + '(' + $sqlDialect->executeNodeProcessor($l.value, $state, $config) + ')' + ' ' + $sqlDialect->keyword('like', $state, $config) + ' ' + 'lower' + '(' + $sqlDialect->executeNodeProcessor($l.pattern, $state, $config) + ')',
+ | $sqlDialect->executeNodeProcessor($l.value, $state, $config) + ' ' + $sqlDialect->keyword('like', $state, $config) + ' ' + $sqlDialect->executeNodeProcessor($l.pattern, $state, $config)
+ ) +
+ $l.escape->executeIfNotEmptyElseReturnEmptyString({|
+ ' ' + $sqlDialect->keyword('escape', $state, $config) + ' ' + $sqlDialect->executeNodeProcessor($l.escape->toOne(), $l, $state, $config)
+ })
+ },
+ {n | true}
+ )
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::bitwiseBinaryExpressionNodeProcessorForAthena(): NodeProcessor[1]
+{
+ nodeProcessor(
+ BitwiseBinaryExpression,
+ {sqlDialect, b, state, config |
+ let leftExpr = $sqlDialect->executeNodeProcessor($b.left, $b, $state, $config);
+ let rightExpr = $sqlDialect->executeNodeProcessor($b.right, $b, $state, $config);
+ let operatorFunction = if(
+ [
+ pair(| $b.operator == BitwiseBinaryOperator.AND, | 'bitwise_and'),
+ pair(| $b.operator == BitwiseBinaryOperator.OR, | 'bitwise_or'),
+ pair(| $b.operator == BitwiseBinaryOperator.XOR, | 'bitwise_xor')
+ ],
+ | failWithMessage('Unhandled bitwise binary operator type: ' + $b.operator->toString())
+ );
+ $sqlDialect->generateFunctionCallWithArgs($operatorFunction, [$leftExpr, $rightExpr], [], $state, $config);
+ }
+ )
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::bitwiseNotExpressionNodeProcessorForAthena(): NodeProcessor[1]
+{
+ nodeProcessor(
+ BitwiseNotExpression,
+ {sqlDialect, b, state, config |
+ let processedArgs = $sqlDialect->executeNodeProcessor($b.expression, $b, $state, $config);
+ $sqlDialect->generateFunctionCallWithArgs('bitwise_not', $processedArgs, [], $state, $config);
+ }
+ )
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::bitwiseShiftExpressionNodeProcessorForAthena(): NodeProcessor[1]
+{
+ nodeProcessor(
+ BitwiseShiftExpression,
+ {sqlDialect, b, state, config |
+ let value = $sqlDialect->executeNodeProcessor($b.value, $b, $state, $config);
+ let shiftUnits = $sqlDialect->executeNodeProcessor($b.shift, $b, $state, $config);
+ let operatorFunction = if(
+ [
+ pair(| $b.direction == BitwiseShiftDirection.LEFT, | 'bitwise_left_shift'),
+ pair(| $b.direction == BitwiseShiftDirection.RIGHT, | 'bitwise_right_shift')
+ ],
+ | failWithMessage('Unhandled bitwise binary shift direction: ' + $b.direction->toString())
+ );
+ $sqlDialect->generateFunctionCallWithArgs($operatorFunction, [$value, $shiftUnits], [], $state, $config);
+ }
+ )
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::castProcessorForAthena(): NodeProcessor[1]
+{
+ // MemSQL supports casting only into limited data types.
+ // https://docs.singlestore.com/cloud/reference/sql-reference/conditional-functions/cast-or-convert/
+ let castTypes = newMap([
+
+ pair('float', 'double'),
+ pair('float4', 'double'),
+ pair('float8', 'double'),
+ pair('int2', 'integer'),
+ pair('int4', 'integer'),
+ pair('int8', 'integer'),
+ pair('numeric', 'double'),
+ pair('character', 'varchar'),
+ pair('character varying', 'varchar'),
+ pair('semistructured', 'string'),
+ pair('bool', 'boolean')
+
+ ]);
+
+ nodeProcessor(
+ Cast,
+ {sqlDialect, c, state, config |
+ generateCast(
+ $sqlDialect,
+ $sqlDialect->executeNodeProcessor($c.expression, [], $state, $config),
+ $sqlDialect->executeNodeProcessor(^ColumnType(name = $castTypes->get($c.type.name->toLower())->orElse($c.type.name), parameters = $c.type.parameters), [], $state, $config),
+ $state,
+ $config
+ )
+ },
+ {n | true}
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaDialectLiteralProcessors(): NodeProcessor[*]
+{
+ [
+ integerLiteralNodeProcessor_default(),
+ stringLiteralNodeProcessor_default(),
+ booleanLiteralNodeProcessor_default(),
+ longLiteralNodeProcessor_default(),
+ doubleLiteralNodeProcessor_default(),
+ decimalLiteralNodeProcessor_default(),
+ dateLiteralNodeProcessor_default(),
+ timestampLiteralNodeProcessor_default(),
+ nullLiteralNodeProcessor_default(),
+ partialDateLiteralNodeProcessorForAthena()
+ ]
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::partialDateLiteralNodeProcessorForAthena(): NodeProcessor[1]
+{
+ nodeProcessor(
+ PartialDateLiteral,
+ {sqlDialect, d, state, config |
+ 'DATE \'' + $d.value->convertDateToSqlString($config.dbConfig.dbTimeZone) + '\''
+ },
+ {n | true}
+ )
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaDialectSelectItemProcessors(): NodeProcessor[*]
+{
+ [
+ allColumnsNodeProcessor_default(),
+ singleColumnNodeProcessor_default()
+ ]
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaDialectOtherNodeProcessors(): NodeProcessor[*]
+{
+ [
+ sortItemProcessor_default(),
+ selectProcessor_default(),
+ withQueryProcessor_default(),
+ windowFrameProcessor_default()
+ ]
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaDialectDDLProcessors(): NodeProcessor[*]
+{
+ [
+ createTestTableProcessorAthena(),
+ dropTestTableProcessor_default(),
+ insertIntoTestTableProcessor_default()
+ ]
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::createTestTableProcessorAthena(): NodeProcessor[1]
+{
+ let supportedTypes = newMap([
+ pair('varchar', 'string'),
+ pair('double precision', 'double')
+ ]);
+ nodeProcessor(
+ CreateTestTable,
+ {sqlDialect, c, state, config |
+ let currentTimeKey = meta::pure::functions::date::now()->toString()->chunk(1)->filter(x | $x->matches('[0-9]'))->makeString();
+ let tableKey = $c.tableName->chunk(1)->filter(x | $x->matches('[a-zA-Z0-9]'))->makeString();
+ let tableLocationKey = $tableKey + $currentTimeKey;
+ $sqlDialect->keyword('create', $state, $config) + ' ' +
+ $sqlDialect->keyword('external', $state, $config) + ' ' +
+ $sqlDialect->keyword('table', $state, $config) + ' ' +
+ $sqlDialect->executeIdentifierProcessor($c.tableName, $config.dbConfig.quoteIdentifiers, $state, $config) +
+ ' (' + $state.separatorIfPretty(1, $config) +
+ $c.columns->map(c|athenaChangeQuoteIndentifierForCreateStatement($sqlDialect->executeIdentifierProcessor($c.first, $config.dbConfig.quoteIdentifiers, $state, $config)) + ' ' + $supportedTypes->get($c.second.name)->orElse($c.second.name);)->joinStrings(',' + $state.separator(1, $config)) + $state.separatorIfPretty(0, $config) +
+ ') Location \'s3://legend-athena-query-results/' + $tableLocationKey + '/\'';
+ }
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::querySpecificationProcessorHelper_athena(sqlDialect:SqlDialect[1], querySpec:QuerySpecification[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let sep0 = $state.separator(0, $config);
+ let sep1 = $state.separator(1, $config);
+
+ // Select
+ $sqlDialect->executeNodeProcessor($querySpec.select, $state, $config) +
+
+ // From
+ $querySpec.from->executeIfNotEmptyElseReturnEmptyString({|
+ $sep0 + $sqlDialect->keyword('from', $state, $config) +
+ $sep1 + $querySpec.from->map(r | $sqlDialect->executeNodeProcessor($r, $state->increaseLevel(), $config))->joinStrings(',' + $sep1)
+ }) +
+
+ // Where
+ $querySpec.where->executeIfNotEmptyElseReturnEmptyString({|
+ $sep0 + $sqlDialect->keyword('where', $state, $config) +
+ $sep1 + $sqlDialect->executeNodeProcessor($querySpec.where->toOne(), $state->increaseLevel(), $config)
+ }) +
+
+ // Group By
+ $querySpec.groupBy->executeIfNotEmptyElseReturnEmptyString({|
+ $sep0 + $sqlDialect->keyword('group by', $state, $config) +
+ $sep1 + $querySpec.groupBy->map(r | $sqlDialect->executeNodeProcessor($r, $state->increaseLevel(), $config))->joinStrings(',' + $sep1)
+ }) +
+
+ // Having
+ $querySpec.having->executeIfNotEmptyElseReturnEmptyString({|
+ $sep0 + $sqlDialect->keyword('having', $state, $config) +
+ $sep1 + $querySpec.having->map(r | $sqlDialect->executeNodeProcessor($r, $state->increaseLevel(), $config))->joinStrings(',' + $sep1)
+ }) +
+
+ // Qualify
+ if (renderQualify($sqlDialect, $querySpec, $state, $config, $sep0, $sep1) == '',
+ | '',
+ | failWithMessage('Athena SQL Dialect does not support Qualify!')
+ ) +
+
+ // Order By
+ $querySpec.orderBy->executeIfNotEmptyElseReturnEmptyString({|
+ $sep0 + $sqlDialect->keyword('order by', $state, $config) +
+ $sep1 + $querySpec.orderBy->map(r | $sqlDialect->executeNodeProcessor($r, $state->increaseLevel(), $config))->joinStrings(',' + $sep1)
+ }) +
+
+
+ // Offset
+ $querySpec.offset->executeIfNotEmptyElseReturnEmptyString({|
+ $sep0 + $sqlDialect->keyword('offset', $state, $config) + ' ' + $sqlDialect->executeNodeProcessor($querySpec.offset->toOne(), $state->increaseLevel(), $config)
+ }) +
+
+ // Limit
+ $querySpec.limit->executeIfNotEmptyElseReturnEmptyString({|
+ $sep0 + $sqlDialect->keyword('limit', $state, $config) + ' ' + $sqlDialect->executeNodeProcessor($querySpec.limit->toOne(), $state->increaseLevel(), $config)
+ });
+}
+
+function meta::external::store::relational::sqlDialectTranslation::athena::querySpecificationProcessor_athena(): NodeProcessor[1]
+{
+ nodeProcessor(
+ QuerySpecification,
+ {sqlDialect, querySpec, state, config | querySpecificationProcessorHelper_athena($sqlDialect, $querySpec, $state, $config);}
+ )
+}
+
+function meta::external::store::relational::sqlDialectTranslation::athena::extendedQuerySpecificationProcessor_athena(): NodeProcessor[1]
+{
+ nodeProcessor(
+ ExtendedQuerySpecification,
+ {sqlDialect, querySpec, state, config | querySpecificationProcessorHelper_athena($sqlDialect, $querySpec, $state, $config)}
+ )
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaKeywords(): String[*]
+{
+ // Based on https://trino.io/docs/current/language/reserved.html
+ [
+ 'alter',
+ 'and',
+ 'as',
+ 'auto',
+ 'between',
+ 'by',
+ 'case',
+ 'cast',
+ 'constraint',
+ 'create',
+ 'cross',
+ 'cube',
+ 'current_catalog',
+ 'current_date',
+ 'current_path',
+ 'current_role',
+ 'current_schema',
+ 'current_time',
+ 'current_timestamp',
+ 'current_user',
+ 'deallocate',
+ 'delete',
+ 'describe',
+ 'distinct',
+ 'drop',
+ 'else',
+ 'end',
+ 'escape',
+ 'except',
+ 'exists',
+ 'extract',
+ 'false',
+ 'for',
+ 'from',
+ 'full',
+ 'group',
+ 'grouping',
+ 'having',
+ 'in',
+ 'inner',
+ 'insert',
+ 'intersect',
+ 'into',
+ 'is',
+ 'join',
+ 'json_array',
+ 'json_exists',
+ 'json_object',
+ 'json_query',
+ 'json_table',
+ 'json_value',
+ 'lateral',
+ 'left',
+ 'like',
+ 'listagg',
+ 'localtime',
+ 'localtimestamp',
+ 'natural',
+ 'normalize',
+ 'not',
+ 'null',
+ 'on',
+ 'or',
+ 'order',
+ 'outer',
+ 'prepare',
+ 'recursive',
+ 'right',
+ 'rollup',
+ 'select',
+ 'skip',
+ 'table',
+ 'then',
+ 'trim',
+ 'true',
+ 'unescape',
+ 'union',
+ 'unnest',
+ 'using',
+ 'values',
+ 'view',
+ 'when',
+ 'where',
+ 'with'
+ ]
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaIdentifierProcessor(): IdentifierProcessor[1]
+{
+ identifierProcessor_default()
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaExpressionPrecedenceComparator(): ExpressionPrecedenceComparator[1]
+{
+ ^ExpressionPrecedenceComparator(
+ findOperatorType = findOperatorType_default_Expression_1__String_1_,
+ operatorPrecedence = operatorPrecedence_default()
+ )
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::asOfJoinProcessorForAthena(): NodeProcessor[1]
+{
+ nodeProcessor(
+ AsOfJoin,
+ {sqlDialect, j, state, config |
+ failWithMessage('Athena SQL Dialect does not support AsOfJoin!');
+ },
+ {n: AsOfJoin[1] | true}
+ );
+}
+
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaFunctionProcessorMap(): Map, FunctionProcessor>[1]
+{
+ newMap([
+ // Postgres Native Functions
+ // Numeric
+ pair(Abs, simpleFunctionProcessor('abs')),
+ pair(Acos, simpleFunctionProcessor('acos')),
+ pair(Asin, simpleFunctionProcessor('asin')),
+ pair(Atan, simpleFunctionProcessor('atan')),
+ pair(Atan2, simpleFunctionProcessor('atan2')),
+ pair(Cbrt, simpleFunctionProcessor('cbrt')),
+ pair(Ceil, customFunctionProcessor(processorForCeil_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Ceiling, customFunctionProcessor(processorForCeil_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Cos, simpleFunctionProcessor('cos')),
+ pair(Cot, customFunctionProcessor(processorForCot_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Degrees, simpleFunctionProcessor('degrees')),
+ pair(Exp, simpleFunctionProcessor('exp')),
+ pair(Floor, customFunctionProcessor(processorForFloor_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Ln, simpleFunctionProcessor('ln')),
+ pair(Log, argTransformFunctionProcessor('log', {n:Node[*]| if($n->size() == 1, | literal(10)->concatenate($n), | $n)})),
+ pair(Mod, simpleFunctionProcessor('mod')),
+ pair(Power, simpleFunctionProcessor('power')),
+ pair(Round, simpleFunctionProcessor('round')),
+ pair(Sign, customFunctionProcessor(processorForSign_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Sin, simpleFunctionProcessor('sin')),
+ pair(Sinh, simpleFunctionProcessor('sinh')),
+ pair(Sqrt, simpleFunctionProcessor('sqrt')),
+ pair(Tan, simpleFunctionProcessor('tan')),
+ pair(Tanh, simpleFunctionProcessor('tanh')),
+
+ // Numeric Aggregate
+ pair(Average, simpleFunctionProcessor('avg')),
+ pair(Sum, simpleFunctionProcessor('sum')),
+ pair(Correlation, simpleFunctionProcessor('corr')),
+ pair(CovarianceSample, simpleFunctionProcessor('covar_samp')),
+ pair(CovariancePopulation, simpleFunctionProcessor('covar_pop')),
+ pair(VariancePopulation, simpleFunctionProcessor('var_pop')),
+ pair(VarianceSample, simpleFunctionProcessor('var_samp')),
+ pair(StdDevSample, simpleFunctionProcessor('stddev_samp')),
+ pair(StdDevPopulation, simpleFunctionProcessor('stddev_pop')),
+
+ // String
+ pair(Ascii, customFunctionProcessor(processorForAscii_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(CharLength, simpleFunctionProcessor('length')),
+ pair(Chr, simpleFunctionProcessor('chr')),
+ pair(Concat, customFunctionProcessor(processorForConcat_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Left, customFunctionProcessor(processorForLeft_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)), // Custom handling to handle negative index
+ pair(Lower, simpleFunctionProcessor('lower')),
+ pair(Lpad, customFunctionProcessor(processorForLpad_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Ltrim, simpleFunctionProcessor('ltrim')),
+ pair(Md5, customFunctionProcessor(processorForMd5_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Repeat, customFunctionProcessor(processorForRepeat_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Replace, simpleFunctionProcessor('replace')),
+ pair(Reverse, simpleFunctionProcessor('reverse')),
+ pair(Right, customFunctionProcessor(processorForRight_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)), // Custom handling to handle negative index
+ pair(Rpad, customFunctionProcessor(processorForRpad_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Rtrim, simpleFunctionProcessor('rtrim')),
+ pair(SplitPart, customFunctionProcessor(processorForSplitPart_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(StrPos, argTransformFunctionProcessor('strpos', {n:Node[*]| $n->concatenate(literal(1))})),
+ pair(Substring, customFunctionProcessor(processorForSubstring_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Upper, simpleFunctionProcessor('upper')),
+ pair(Greatest, simpleFunctionProcessor('greatest')),
+ pair(Least, simpleFunctionProcessor('least')),
+
+ // String Aggregate
+ pair(StringAgg, customFunctionProcessor(processorForStringAgg_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+
+ // Boolean Aggregate
+ pair(BoolAnd, simpleFunctionProcessor('bool_and')),
+ pair(BoolOr, simpleFunctionProcessor('bool_or')),
+
+ // Temporal
+ pair(DatePart, customFunctionProcessor(processorForDatePart_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(DateTrunc, customFunctionProcessor(processorForDateTrunc_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Now, simpleFunctionProcessor('now')),
+ pair(ToDate, customFunctionProcessor(processorForToDate_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(ToTimestamp, customFunctionProcessor(processorForToTimestamp_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(meta::external::store::relational::sqlDialectTranslation::functionRegistry::postgresNativeFunctions::temporal::Date, simpleFunctionProcessor('date')),
+
+ // Miscellaneous
+ pair(Coalesce, simpleFunctionProcessor('coalesce')),
+
+ // Aggregate
+ pair(Count, simpleFunctionProcessor('count')),
+ pair(Max, simpleFunctionProcessor('max')),
+ pair(Min, simpleFunctionProcessor('min')),
+
+ // Window
+ pair(CumulativeDistribution, simpleFunctionProcessor('cume_dist')),
+ pair(DenseRank, simpleFunctionProcessor('dense_rank')),
+ pair(FirstValue, simpleFunctionProcessor('first_value')),
+ pair(PercentRank, simpleFunctionProcessor('percent_rank')),
+ pair(Lag, simpleFunctionProcessor('lag')),
+ pair(LastValue, simpleFunctionProcessor('last_value')),
+ pair(Lead, simpleFunctionProcessor('lead')),
+ pair(NthValue, simpleFunctionProcessor('nth_value')),
+ pair(Ntile, simpleFunctionProcessor('ntile')),
+ pair(Rank, simpleFunctionProcessor('rank')),
+ pair(RowNumber, simpleFunctionProcessor('row_number')),
+ pair(AverageRank, customFunctionProcessor(processorForAverageRank_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+
+ // Extension functions
+ // Numeric
+ pair(Log10, argTransformFunctionProcessor('log', {n:Node[*]| literal(10)->concatenate($n)})),
+ pair(Cosh, simpleFunctionProcessor('cosh')),
+
+ // String
+ pair(RegexpLike, customFunctionProcessor(processorForRegexpLikeAthena_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Sha1, customFunctionProcessor(processorForSha1_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Sha256, customFunctionProcessor(processorForSha256_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(Contains, customFunctionProcessor(processorForContainsAthena_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(EncodeBase64, customFunctionProcessor(processorForEncodeBase64_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(DecodeBase64, customFunctionProcessor(processorForDecodeBase64_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(EditDistance, simpleFunctionProcessor('levenshtein_distance')),
+ pair(StartsWith, simpleFunctionProcessor('starts_with')),
+ pair(EndsWith, customFunctionProcessor(processorForEndsWithAthena_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(ToChar, customFunctionProcessor(processorForToChar_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(UuidV4, customFunctionProcessor(processorForToUuidV4_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+
+ // Temporal
+ pair(MakeDate, customFunctionProcessor(processorForMakeDate_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(MakeTimestamp, customFunctionProcessor(processorForMakeTimestamp_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(DateDiff, customFunctionProcessor(processorForDateDiff_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(DateAdd, customFunctionProcessor(processorForDateAdd_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+ pair(ConvertTimeZone, customFunctionProcessor(processorForConvertTimeZone_FunctionCall_1__SqlDialect_1__SqlDialectTranslationState_1__SqlDialectTranslationConfig_1__String_1_)),
+
+ // Miscellaneous
+ pair(ParseJson, simpleFunctionProcessor('json_parse')) // fail
+ ])
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForCeil(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let ceilCall = simpleFunctionProcessor('ceil').processFunction->toOne()->eval($sqlDialect, $f, $state, $config);
+ $sqlDialect->generateCast($ceilCall, 'DECIMAL(37, 1)', $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForCot(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ '(1/' + $sqlDialect->generateFunctionCallWithArgs('tan', $processedArgs, [], $state, $config) + ')';
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForFloor(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let ceilCall = simpleFunctionProcessor('floor').processFunction->toOne()->eval($sqlDialect, $f, $state, $config);
+ $sqlDialect->generateCast($ceilCall, 'DECIMAL(37, 1)', $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForSign(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let ceilCall = simpleFunctionProcessor('sign').processFunction->toOne()->eval($sqlDialect, $f, $state, $config);
+ $sqlDialect->generateCast($ceilCall, 'INTEGER', $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForAscii(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config)->at(0)->removeQuotes($sqlDialect);
+ if ($processedArgs->meta::pure::functions::string::length() == 0,
+ | '0',
+ | $sqlDialect->generateFunctionCallWithArgs('codepoint', $processedArgs->substring(0, 1)->addQuotes($sqlDialect), [], $state, $config)
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForConcat(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config)->map({arg | let generatedCast = $sqlDialect->generateCast($arg, 'VARCHAR', $state, $config);
+ $sqlDialect->generateFunctionCallWithArgs('coalesce', [$generatedCast, '\'\''], $state, $config);
+ });
+ $sqlDialect->generateFunctionCallWithArgs('concat', $processedArgs, [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForLeft(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ let index = $processedArgs->at(1)->parseInteger();
+ if($index<0,
+ | $sqlDialect->generateFunctionCallWithArgs('substring', [$processedArgs->at(0), '1', ($sqlDialect->generateFunctionCallWithArgs('length', [$processedArgs->at(0)], [], $state, $config) + $index->toString())], [], $state, $config),
+ | $sqlDialect->generateFunctionCallWithArgs('substring', [$processedArgs->at(0), '1', $index->toString()], [], $state, $config)
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForLpad(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ if($processedArgs->size()==2,
+ | $sqlDialect->generateFunctionCallWithArgs('lpad', [$processedArgs->at(0), $processedArgs->at(1), '\' \''], [], $state, $config),
+ | if ($processedArgs->at(2) == '\'\'',
+ | $processedArgs->at(0),
+ | $sqlDialect->generateFunctionCallWithArgs('lpad', [$processedArgs->at(0), $processedArgs->at(1), $processedArgs->at(2)], [], $state, $config)
+ )
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForMd5(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ let md5Call = $sqlDialect->generateFunctionCallWithArgs('md5', [$sqlDialect->generateFunctionCallWithArgs('to_utf8', $processedArgs, [], $state, $config)], [], $state, $config);
+ $sqlDialect->generateFunctionCallWithArgs('lower', [$sqlDialect->generateFunctionCallWithArgs('to_hex', $md5Call, [], $state, $config)], [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForRepeat(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ let lengthToRepeat = generateFunctionCallWithArgs($sqlDialect, 'length', [$processedArgs->at(0)], $state, $config) + ' * ' +$processedArgs->at(1);
+ if ($processedArgs->at(0) == '\'\'',
+ | $processedArgs->at(0),
+ | generateFunctionCallWithArgs($sqlDialect, 'rpad', ['\'\'', $lengthToRepeat, $processedArgs->at(0)], $state, $config)
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForRpad(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ if($processedArgs->size()<3,
+ | $sqlDialect->generateFunctionCallWithArgs('rpad', [$processedArgs->at(0), $processedArgs->at(1), '\' \''], [], $state, $config),
+ | if ($processedArgs->at(2) == '\'\'',
+ | $processedArgs->at(0),
+ | $sqlDialect->generateFunctionCallWithArgs('rpad', [$processedArgs->at(0), $processedArgs->at(1), $processedArgs->at(2)], [], $state, $config)
+ )
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForSplitPart(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ if ($processedArgs->at(1) == '\'\'',
+ | $processedArgs->at(0),
+ | $sqlDialect->generateFunctionCallWithArgs('split_part', [$processedArgs->at(0), $processedArgs->at(1), $processedArgs->at(2)], [], $state, $config)
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForSubstring(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ if ($processedArgs->size() == 2,
+ | $sqlDialect->generateFunctionCallWithArgs('substring', [$processedArgs->at(0), ($processedArgs->at(1) + '+' + '1')], [], $state, $config),
+ | $sqlDialect->generateFunctionCallWithArgs('substring', [$processedArgs->at(0), ($processedArgs->at(1) + '+' + '1'), $processedArgs->at(2)], [], $state, $config)
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForAverageRank(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let rankCall = simpleFunctionProcessor('rank').processFunction->toOne()->eval($sqlDialect, $f, $state, $config);
+ let denseRankCall = simpleFunctionProcessor('dense_rank').processFunction->toOne()->eval($sqlDialect, $f, $state, $config);
+ '(' + $rankCall + '+' + $denseRankCall + ') / 2';
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForRegexpLikeAthena(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ $sqlDialect->generateFunctionCallWithArgs('regexp_like', [$processedArgs->at(0), ('\'^' + $processedArgs->at(1)->removeQuotes($sqlDialect) + '$\'')] , [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForSha1(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ let md5Call = $sqlDialect->generateFunctionCallWithArgs('sha1', [$sqlDialect->generateFunctionCallWithArgs('to_utf8', $processedArgs, [], $state, $config)], [], $state, $config);
+ $sqlDialect->generateFunctionCallWithArgs('lower', [$sqlDialect->generateFunctionCallWithArgs('to_hex', $md5Call, [], $state, $config)], [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForSha256(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ let md5Call = $sqlDialect->generateFunctionCallWithArgs('sha256', [$sqlDialect->generateFunctionCallWithArgs('to_utf8', $processedArgs, [], $state, $config)], [], $state, $config);
+ $sqlDialect->generateFunctionCallWithArgs('lower', [$sqlDialect->generateFunctionCallWithArgs('to_hex', $md5Call, [], $state, $config)], [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForContainsAthena(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let strposCall = simpleFunctionProcessor('strpos').processFunction->toOne()->eval($sqlDialect, $f, $state, $config);
+ $sqlDialect->generateCast($strposCall, 'BOOLEAN', $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForEncodeBase64(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ $sqlDialect->generateFunctionCallWithArgs('to_base64', [$sqlDialect->generateFunctionCallWithArgs('to_utf8', $processedArgs, [], $state, $config)], [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForDecodeBase64(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ $sqlDialect->generateFunctionCallWithArgs('from_utf8', [$sqlDialect->generateFunctionCallWithArgs('from_base64', $processedArgs, [], $state, $config)], [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForToUuidV4(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let ceilCall = simpleFunctionProcessor('uuid').processFunction->toOne()->eval($sqlDialect, $f, $state, $config);
+ $sqlDialect->generateCast($ceilCall, 'VARCHAR', $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForEndsWithAthena(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ $sqlDialect->generateFunctionCallWithArgs('starts_with', [$sqlDialect->generateFunctionCallWithArgs('reverse', $processedArgs->at(0), [], $state, $config), $sqlDialect->generateFunctionCallWithArgs('reverse', $processedArgs->at(1), [], $state, $config)], [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForRight(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ let reverseInput = $sqlDialect->generateFunctionCallWithArgs('reverse', [$processedArgs->at(0)], [], $state, $config);
+ let index = $processedArgs->at(1)->parseInteger();
+ let reverseInputLtrimmed = if($index<0,
+ | $sqlDialect->generateFunctionCallWithArgs('substring', [$reverseInput, '1', ($sqlDialect->generateFunctionCallWithArgs('length', [$processedArgs->at(0)], [], $state, $config) + $index->toString())], [], $state, $config),
+ | $sqlDialect->generateFunctionCallWithArgs('substring', [$reverseInput, '1', $index->toString()], [], $state, $config)
+ );
+ $sqlDialect->generateFunctionCallWithArgs('reverse', [$reverseInputLtrimmed], [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForStringAgg(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ generateFunctionCallWithArgs($sqlDialect, 'listagg', $processedArgs, $state, $config) + 'within group (order by ' + $processedArgs->at(0) + ' )';
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForDatePart(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ let datePart = $processedArgs->at(0)->toString()->removeQuotes($sqlDialect);
+ if($datePart->toLower() == 'millisecond',
+ | let seconds = generateFunctionCallWithArgs($sqlDialect, 'second', [$processedArgs->at(1)], [], $state, $config) + '* 1000';
+ $seconds + ' + ' + generateFunctionCallWithArgs($sqlDialect, 'millisecond', [$processedArgs->at(1)], [], $state, $config);,
+ | let inputText = $datePart + ' ' + $sqlDialect->keyword('from', $state, $config) + ' ' + $processedArgs->at(1);
+ generateFunctionCallWithArgs($sqlDialect, $datePart->toLower(), [$processedArgs->at(1)], [], $state, $config);
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForDateTrunc(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ let dateTrunc = generateFunctionCallWithArgs($sqlDialect, 'date_trunc', [$processedArgs->at(0), $processedArgs->at(1)], [], $state, $config);
+ $sqlDialect->generateCast($dateTrunc, 'TIMESTAMP', $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForToDate(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ let parsedDateTime = generateFunctionCallWithArgs($sqlDialect, 'date_parse', [$processedArgs->at(0), $processedArgs->at(1)->dateFormatSpecifierForAthena()], [], $state, $config);
+ generateFunctionCallWithArgs($sqlDialect, 'date', [$parsedDateTime], [], $state, $config);
+
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForToTimestamp(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ if($processedArgs->size() == 1,
+ | generateFunctionCallWithArgs($sqlDialect, 'from_unixtime', [$processedArgs->at(0)], [], $state, $config),
+ | generateFunctionCallWithArgs($sqlDialect, 'date_parse', [$processedArgs->at(0), $processedArgs->at(1)->dateFormatSpecifierForAthena()], [], $state, $config);
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForMakeDate(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ generateFunctionCallWithArgs($sqlDialect, 'date', [('\'' + $processedArgs->at(0) + '-' + $processedArgs->at(1) + '-' + $processedArgs->at(2) + '\'')], [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForMakeTimestamp(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ $sqlDialect->generateCast(('\'' + $processedArgs->at(0) + '-' + $processedArgs->at(1) + '-' + $processedArgs->at(2) + ' ' + $processedArgs->at(3) + ':' + $processedArgs->at(4) + ':' + $processedArgs->at(5) + '\''), 'TIMESTAMP', $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForDateDiff(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ $processedArgs->dateDiffHandlerForAthena($sqlDialect);
+}
+
+function meta::external::store::relational::sqlDialectTranslation::athena::dateDiffHandlerForAthena(p: String[*], sqlDialect:SqlDialect[1]): String[1]
+{
+ let timeUnits = ['year', 'month', 'day', 'week', 'hour', 'minute', 'second', 'millisecond'];
+ let indexOfUnit = $timeUnits->indexOf($p->at(0)->removeQuotes($sqlDialect)->toLower());
+ let unitFunctionsList = [
+
+ { | format('(%s)', [
+ 'date_diff(\'year\', date_trunc(\'year\',%s), date_trunc(\'year\',%s))'
+ ])},
+
+ { | format('(%s)', [
+ 'date_diff(\'month\', date_trunc(\'month\',%s), date_trunc(\'month\',%s))'
+ ])},
+
+ { | format('(%s)', [
+ 'date_diff(\'day\', date_trunc(\'day\',%s), date_trunc(\'day\',%s))'
+ ])},
+
+ { | format('(cast(%s / 7 as integer))', [
+ ['day', '%s', '%s']->dateDiffHandlerForAthena($sqlDialect)
+ ])},
+
+ { | format('(%s)', [
+ 'date_diff(\'hour\', date_trunc(\'hour\',%s), date_trunc(\'hour\',%s))'
+ ])},
+
+ { | format('(%s)', [
+ 'date_diff(\'minute\', date_trunc(\'minute\',%s), date_trunc(\'minute\',%s))'
+ ])},
+
+ { | format('(%s)', [
+ 'date_diff(\'second\', date_trunc(\'second\',%s), date_trunc(\'second\',%s))'
+ ])},
+
+ { | format('(%s)', [
+ 'date_diff(\'millisecond\', date_trunc(\'millisecond\',%s), date_trunc(\'millisecond\',%s))'
+ ])}
+
+ ];
+
+ format($unitFunctionsList->at($indexOfUnit)->eval(), [$p->at(1), $p->at(2)]);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForDateAdd(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ let timeUnit = $processedArgs->at(2)->toLower();
+ if ($timeUnit == '\'microsecond\'',
+ |failWithMessage('Athena SQL Dialect does not support adding microsecond to date'),
+ |if ($timeUnit == '\'millisecond\'',
+ |generateFunctionCallWithArgs($sqlDialect, 'date_add', [$timeUnit, $processedArgs->at(1), generateCast($sqlDialect, $processedArgs->at(0), 'TIMESTAMP(3)', $state, $config)], [], $state, $config),
+ |generateFunctionCallWithArgs($sqlDialect, 'date_add', [$timeUnit, $processedArgs->at(1), $processedArgs->at(0)], [], $state, $config)
+ )
+ );
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForConvertTimeZone(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ let convertedTime = generateFunctionCallWithArgs($sqlDialect, 'at_timezone', [$processedArgs->at(0), $processedArgs->at(1)], [], $state, $config);
+ generateFunctionCallWithArgs($sqlDialect, 'date_format', [$convertedTime, $processedArgs->at(2)->dateFormatSpecifierForAthena()], [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::processorForToChar(f:FunctionCall[1], sqlDialect:SqlDialect[1], state:SqlDialectTranslationState[1], config:SqlDialectTranslationConfig[1]): String[1]
+{
+ let processedArgs = $sqlDialect->processFunctionArgs($f.arguments, $state, $config);
+ generateFunctionCallWithArgs($sqlDialect, 'date_format', [$processedArgs->at(0), $processedArgs->at(1)->dateFormatSpecifierForAthena()], [], $state, $config);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::dateFormatSpecifierForAthena(f:String[1]): String[1]
+{
+ let formatSubs = [
+ pair('Month', '%M'),
+ pair('Day', '%W'),
+ pair('YYYY', '%Y'),
+ pair('MM', '%m'),
+ pair('DD', '%d'),
+ pair('Mon', '%b'),
+ pair('HH24', '%H'),
+ pair('HH12', '%h'),
+ pair('HH', '%h'),
+ pair('MI', '%i'),
+ pair('SS', '%s'),
+ pair('MS', '%f')
+ // TODO: Handle more format specifiers
+ ];
+
+ $formatSubs->fold({i, a|$a->replace($i.first, $i.second)}, $f);
+}
+
+function <> meta::external::store::relational::sqlDialectTranslation::athena::athenaVariablePlaceholderPrefixSuffixMap(): Map>[1]
+{
+ [
+ pair('String', pair('\'', '\'')),
+ pair('Integer', pair('', '')),
+ pair('Decimal', pair('', '')),
+ pair('Number', pair('', '')),
+ pair('SQLNull', pair('', '')),
+ pair('Float', pair('', '')),
+ pair('StrictDate', pair('DATE \'', '\'')),
+ pair('DateTime', pair('TIMESTAMP \'', '\'')),
+ pair('Date', pair('TIMESTAMP \'', '\'')),
+ pair('Boolean', pair('', '')),
+ pair('Enum', pair('', ''))
+ ]->newMap();
+}
\ No newline at end of file
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/test/java/org/finos/legend/pure/code/core/Test_Pure_ExternalStoreRelationalSqlDialectTranslationAthena.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/test/java/org/finos/legend/pure/code/core/Test_Pure_ExternalStoreRelationalSqlDialectTranslationAthena.java
new file mode 100644
index 00000000000..ed99b3123a6
--- /dev/null
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure/src/test/java/org/finos/legend/pure/code/core/Test_Pure_ExternalStoreRelationalSqlDialectTranslationAthena.java
@@ -0,0 +1,32 @@
+// Copyright 2025 Goldman Sachs
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.finos.legend.pure.code.core;
+
+import junit.framework.TestSuite;
+import org.finos.legend.pure.m3.execution.test.PureTestBuilder;
+import org.finos.legend.pure.m3.execution.test.TestCollection;
+import org.finos.legend.pure.runtime.java.compiled.execution.CompiledExecutionSupport;
+import org.finos.legend.pure.runtime.java.compiled.testHelper.PureTestBuilderCompiled;
+
+public class Test_Pure_ExternalStoreRelationalSqlDialectTranslationAthena
+{
+ public static TestSuite suite()
+ {
+ CompiledExecutionSupport executionSupport = PureTestBuilderCompiled.getClassLoaderExecutionSupport();
+ TestSuite suite = new TestSuite();
+ suite.addTest(PureTestBuilderCompiled.buildSuite(TestCollection.collectTests("meta::external::store::relational::sqlDialectTranslation::athena", executionSupport.getProcessorSupport(), fn -> PureTestBuilderCompiled.generatePureTestCollection(fn, executionSupport), ci -> PureTestBuilder.satisfiesConditions(ci, executionSupport.getProcessorSupport())), executionSupport));
+ return suite;
+ }
+}
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/pom.xml b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/pom.xml
index 04eed026d44..0478dc4be5a 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/pom.xml
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-athena/pom.xml
@@ -31,5 +31,8 @@
legend-engine-xt-relationalStore-athena-grammarlegend-engine-xt-relationalStore-athena-protocollegend-engine-xt-relationalStore-athena-pure
+ legend-engine-xt-relationalStore-athena-PCT
+ legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure
+ legend-engine-xt-relationalStore-athena-SDT
\ No newline at end of file
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-h2/legend-engine-xt-relationalStore-h2-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/h2/pct/Test_Relational_H2_EssentialFunctions_PCT.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-h2/legend-engine-xt-relationalStore-h2-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/h2/pct/Test_Relational_H2_EssentialFunctions_PCT.java
index 9234ef7d7c2..2664e175efb 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-h2/legend-engine-xt-relationalStore-h2-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/h2/pct/Test_Relational_H2_EssentialFunctions_PCT.java
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-dbExtension/legend-engine-xt-relationalStore-h2/legend-engine-xt-relationalStore-h2-PCT/src/test/java/org/finos/legend/engine/plan/execution/stores/relational/test/h2/pct/Test_Relational_H2_EssentialFunctions_PCT.java
@@ -220,7 +220,6 @@ public class Test_Relational_H2_EssentialFunctions_PCT extends PCTReportConfigur
" mod(DoubleSqlType, DoubleSqlType):DoubleSqlType,\n" +
" mod(AbstractNumericSqlType, AbstractNumericSqlType):AbstractNumericSqlType\n" +
"]\"", AdapterQualifier.unsupportedFeature),
- one("meta::pure::functions::math::tests::mod::testModWithNegativeNumbers_Function_1__Boolean_1_", "\"\nexpected: 3\nactual: -2\"", AdapterQualifier.needsInvestigation),
// Rem
one("meta::pure::functions::math::tests::rem::testRemInEvalWithFloat_Function_1__Boolean_1_", "\"\nexpected: 2.5\nactual: 3\"", AdapterQualifier.needsInvestigation),
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection-authentication-default/pom.xml b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection-authentication-default/pom.xml
index 01c724c5b13..c15698b5ef5 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection-authentication-default/pom.xml
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection-authentication-default/pom.xml
@@ -173,6 +173,10 @@
commons-iotest
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-execution
+ org.finos.legend.enginelegend-engine-xt-relationalStore-memsql-execution
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection-authentication-default/src/main/java/org/finos/legend/engine/authentication/LegendDefaultDatabaseAuthenticationFlowProvider.java b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection-authentication-default/src/main/java/org/finos/legend/engine/authentication/LegendDefaultDatabaseAuthenticationFlowProvider.java
index 1546fc85181..fa403f48527 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection-authentication-default/src/main/java/org/finos/legend/engine/authentication/LegendDefaultDatabaseAuthenticationFlowProvider.java
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-execution/legend-engine-xt-relationalStore-executionPlan-connection-authentication-default/src/main/java/org/finos/legend/engine/authentication/LegendDefaultDatabaseAuthenticationFlowProvider.java
@@ -30,6 +30,7 @@
import org.finos.legend.engine.authentication.flows.SqlServerStaticWithUserPasswordFlow;
import org.finos.legend.engine.authentication.flows.TrinoWithDelegatedKerberosFlow;
import org.finos.legend.engine.authentication.flows.TrinoWithUserPasswordFlow;
+import org.finos.legend.engine.authentication.flows.AthenaWithUserNamePasswordFlow;
import org.finos.legend.engine.authentication.flows.middletier.PostgresStaticWithMiddletierUserNamePasswordAuthenticationFlow;
import org.finos.legend.engine.authentication.provider.AbstractDatabaseAuthenticationFlowProvider;
import org.finos.legend.engine.authentication.provider.DatabaseAuthenticationFlowProviderConfiguration;
@@ -60,7 +61,8 @@ public LegendDefaultDatabaseAuthenticationFlowProvider()
new RedshiftWithUserPasswordFlow(),
new MemSQLStaticWithUserPasswordFlow(),
new TrinoWithDelegatedKerberosFlow(),
- new TrinoWithUserPasswordFlow()
+ new TrinoWithUserPasswordFlow(),
+ new AthenaWithUserNamePasswordFlow()
).withAll(
databaseAuthenticationFlowProviderConfiguration != null ?
Lists.mutable.of(
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/relationalMappingExecution.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/relationalMappingExecution.pure
index e3de3e0caa7..2c753966b9d 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/relationalMappingExecution.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/relationalMappingExecution.pure
@@ -384,7 +384,7 @@ function meta::relational::mapping::execution(store: Database[1], f:ValueSpecifi
function meta::relational::mapping::useDialectTranslation(r:RelationalOperationElement[1], dbType:DatabaseType[1]):Boolean[1]
{
- $dbType->in([DatabaseType.H2]) && (!$r->instanceOf(SQLQuery) || $r->instanceOf(SelectSQLQuery))// && false;
+ $dbType->in([DatabaseType.H2, DatabaseType.Athena]) && (!$r->instanceOf(SQLQuery) || $r->instanceOf(SelectSQLQuery))// && false;
}
function meta::relational::mapping::toSqlString(s:SQLQuery[1], connection:meta::external::store::relational::runtime::DatabaseConnection[1], pretty:Boolean[1], extensions:Extension[*]):String[1]
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/sqlDialectTranslation/toPostgresModel.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/sqlDialectTranslation/toPostgresModel.pure
index 911069c73a0..8a55e305a12 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/sqlDialectTranslation/toPostgresModel.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/sqlDialectTranslation/toPostgresModel.pure
@@ -265,7 +265,7 @@ function <> meta::relational::functions::toPostgresModel::getDyn
pair('bitShiftLeft', {p:meta::external::query::sql::metamodel::Expression[*]| ^BitwiseShiftExpression(value = $p->at(0), shift = $p->at(1), direction = BitwiseShiftDirection.LEFT)}),
pair('bitShiftRight', {p:meta::external::query::sql::metamodel::Expression[*]| ^BitwiseShiftExpression(value = $p->at(0), shift = $p->at(1), direction = BitwiseShiftDirection.RIGHT)}),
pair('abs', functionCall('abs')),
- pair('mod', functionCall('mod')),
+ pair('mod', {p:meta::external::query::sql::metamodel::Expression[*]| functionCall('mod', [^ArithmeticExpression(type = ArithmeticType.ADD, left = functionCall('mod', $p), right = $p->at(1)), $p->at(1)])}),
pair('cbrt', functionCall('cbrt')),
pair('ceiling', {p:meta::external::query::sql::metamodel::Expression[*]| castExpression(functionCall('ceiling', $p), 'bigint')}),
pair('floor', {p:meta::external::query::sql::metamodel::Expression[*]| castExpression(functionCall('floor', $p), 'bigint')}),
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/sqlQueryToString/dbExtension.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/sqlQueryToString/dbExtension.pure
index d94f57c5cb0..8445ccab8ab 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/sqlQueryToString/dbExtension.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/sqlQueryToString/dbExtension.pure
@@ -1225,7 +1225,7 @@ Enum meta::relational::functions::sqlQueryToString::DynaFunctionRegistry
percentRank,
plus,
position,
- pow,
+ pow,
previousDayOfWeek,
quarter,
quarterNumber,
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/tests/mapping/sqlFunction/testSqlFunctionsInMapping.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/tests/mapping/sqlFunction/testSqlFunctionsInMapping.pure
index e0b5fda2a14..1eab299a463 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/tests/mapping/sqlFunction/testSqlFunctionsInMapping.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/tests/mapping/sqlFunction/testSqlFunctionsInMapping.pure
@@ -363,14 +363,14 @@ function <> meta::relational::tests::mapping::sqlFunction::mod::testP
{
let result = execute(|SqlFunctionDemo.all()->project([s | $s.floatModResult ], ['mod']), testMapping, testDataTypeMappingRuntime(), meta::relational::extension::relationalExtensions());
assertEquals([1, 0], $result.values->at(0).rows.values);
- assertEquals('select mod("root".int1, 2) as "mod" from dataTable as "root"',$result->sqlRemoveFormatting());
+ assertEquals('select mod(mod("root".int1, 2) + 2, 2) as "mod" from dataTable as "root"',$result->sqlRemoveFormatting());
}
function <> meta::relational::tests::mapping::sqlFunction::mod::testFilter():Boolean[1]
{
let result = execute(|SqlFunctionDemo.all()->filter(s | $s.floatModResult > 0)->project([s | $s.floatModResult], ['mod']), testMapping, testDataTypeMappingRuntime(), meta::relational::extension::relationalExtensions());
assertEquals([1], $result.values->at(0).rows.values);
- assertEquals('select mod("root".int1, 2) as "mod" from dataTable as "root" where mod("root".int1, 2) > 0',$result->sqlRemoveFormatting());
+ assertEquals('select mod(mod("root".int1, 2) + 2, 2) as "mod" from dataTable as "root" where mod(mod("root".int1, 2) + 2, 2) > 0',$result->sqlRemoveFormatting());
}
function <> meta::relational::tests::mapping::sqlFunction::rem::testProject():Boolean[1]
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/tests/query/testWithFunction.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/tests/query/testWithFunction.pure
index 8647d928c94..482cfb39884 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/tests/query/testWithFunction.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-core-pure/src/main/resources/core_relational/relational/tests/query/testWithFunction.pure
@@ -421,7 +421,7 @@ function <> meta::relational::tests::query::function::mod::testFilter
{
let result = execute(|Trade.all()->filter(t | mod($t.quantity->floor(), $t.id) > 2), simpleRelationalMapping, meta::external::store::relational::tests::testRuntime(), meta::relational::extension::relationalExtensions());
assertSameElements([4, 6, 8, 10, 11], $result.values.id);
- assertSameSQL('select "root".ID as "pk_0", "root".ID as "id", "root".quantity as "quantity", "root".tradeDate as "date", "root".settlementDateTime as "settlementDateTime", "tradeeventviewmaxtradeeventdate_0".maxTradeEventDate as "latestEventDate" from tradeTable as "root" left outer join (select "root".trade_id as trade_id, max("root".eventDate) as maxTradeEventDate from tradeEventTable as "root" group by "root".trade_id) as "tradeeventviewmaxtradeeventdate_0" on ("root".ID = "tradeeventviewmaxtradeeventdate_0".trade_id) where mod(cast(cast(floor("root".quantity) as numeric) as bigint), "root".ID) > 2', $result);
+ assertSameSQL('select "root".ID as "pk_0", "root".ID as "id", "root".quantity as "quantity", "root".tradeDate as "date", "root".settlementDateTime as "settlementDateTime", "tradeeventviewmaxtradeeventdate_0".maxTradeEventDate as "latestEventDate" from tradeTable as "root" left outer join (select "root".trade_id as trade_id, max("root".eventDate) as maxTradeEventDate from tradeEventTable as "root" group by "root".trade_id) as "tradeeventviewmaxtradeeventdate_0" on ("root".ID = "tradeeventviewmaxtradeeventdate_0".trade_id) where mod(mod(cast(cast(floor("root".quantity) as numeric) as bigint), "root".ID) + "root".ID, "root".ID) > 2', $result);
}
function <> meta::relational::tests::query::function::rem::testFilterUsingRemFunction():Boolean[1]
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation/functionRegistry/postgresNativeFunctions/aggregate/max.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation/functionRegistry/postgresNativeFunctions/aggregate/max.pure
index 86aad84527f..202dcdf1943 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation/functionRegistry/postgresNativeFunctions/aggregate/max.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation/functionRegistry/postgresNativeFunctions/aggregate/max.pure
@@ -39,48 +39,48 @@ function meta::external::store::relational::sqlDialectTranslation::functionRegis
)
}),
tests = [
- sqlFunctionTest(
- ^TestSetupData(
- tableName = 'testTable',
- columns = [pair('marks', 'integer'), pair('subject', 'varchar'), pair('name', 'varchar')],
- data = [
- dataRow([18, 'Math', 'Robert']),
- dataRow([32, 'Physics', 'Robert']),
- dataRow([20, 'Math', 'Jane']),
- dataRow([25, 'Physics', 'Jane']),
- dataRow([16, 'Math', 'John']),
- dataRow([43, 'Chemistry', 'Robert']),
- dataRow([26, 'Chemistry', 'Jane'])
- ]
- ),
- // SELECT subject, max(marks) AS result FROM testTable GROUP BY subject ORDER BY result ASC NULLS LAST
- simpleAggFunctionCall(
- ^FunctionCall(
- name = ^QualifiedName(parts = 'max'),
- arguments = [^QualifiedNameReference(name = ^QualifiedName(parts = 'marks'))]
- ),
- 'testTable',
- 'subject'
- ),
- ^TestExpectedResult(
- columns = ['subject', 'result'],
- data = [
- list(['Math', 20]),
- list(['Physics', 32]),
- list(['Chemistry', 43])
- ]
- )
- ),
+ sqlFunctionTest(
+ ^TestSetupData(
+ tableName = 'testTable',
+ columns = [pair('marks', 'integer'), pair('subject', 'varchar'), pair('name', 'varchar')],
+ data = [
+ dataRow([18, 'Math', 'Robert']),
+ dataRow([32, 'Physics', 'Robert']),
+ dataRow([20, 'Math', 'Jane']),
+ dataRow([25, 'Physics', 'Jane']),
+ dataRow([16, 'Math', 'John']),
+ dataRow([43, 'Chemistry', 'Robert']),
+ dataRow([26, 'Chemistry', 'Jane'])
+ ]
+ ),
+ // SELECT subject, max(marks) AS result FROM testTable GROUP BY subject ORDER BY result ASC NULLS LAST
+ simpleAggFunctionCall(
+ ^FunctionCall(
+ name = ^QualifiedName(parts = 'max'),
+ arguments = [^QualifiedNameReference(name = ^QualifiedName(parts = 'marks'))]
+ ),
+ 'testTable',
+ 'subject'
+ ),
+ ^TestExpectedResult(
+ columns = ['subject', 'result'],
+ data = [
+ list(['Math', 20]),
+ list(['Physics', 32]),
+ list(['Chemistry', 43])
+ ]
+ )
+ ),
sqlFunctionTest(
^TestSetupData(
tableName = 'testTable',
columns = [pair('name', 'varchar'), pair('class', 'varchar'), pair('dob', 'date')],
data = [
- dataRow(['Robert', 'Fifth', '2015-12-30']),
- dataRow(['Julie', 'Fifth', '2015-12-31']),
- dataRow(['Alex', 'Fourth', '2014-11-30']),
- dataRow(['Katie', 'Fourth', '2014-07-30']),
- dataRow(['Thomas', 'Third', '2013-07-30'])
+ dataRow(['Robert', 'Fifth', %2015-12-30]),
+ dataRow(['Julie', 'Fifth', %2015-12-31]),
+ dataRow(['Alex', 'Fourth', %2014-11-30]),
+ dataRow(['Katie', 'Fourth', %2014-07-30]),
+ dataRow(['Thomas', 'Third', %2013-07-30])
]
),
// SELECT class, max(dob) AS result FROM testTable GROUP BY class ORDER BY result ASC NULLS LAST
diff --git a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation/functionRegistry/postgresNativeFunctions/aggregate/min.pure b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation/functionRegistry/postgresNativeFunctions/aggregate/min.pure
index c53f457f64f..9b43647034d 100644
--- a/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation/functionRegistry/postgresNativeFunctions/aggregate/min.pure
+++ b/legend-engine-xts-relationalStore/legend-engine-xt-relationalStore-generation/legend-engine-xt-relationalStore-pure/legend-engine-xt-relationalStore-sqlDialectTranslation-pure/src/main/resources/core_external_store_relational_sql_dialect_translation/functionRegistry/postgresNativeFunctions/aggregate/min.pure
@@ -76,11 +76,11 @@ function meta::external::store::relational::sqlDialectTranslation::functionRegis
tableName = 'testTable',
columns = [pair('name', 'varchar'), pair('class', 'varchar'), pair('dob', 'date')],
data = [
- dataRow(['Robert', 'Fifth', '2015-12-30']),
- dataRow(['Julie', 'Fifth', '2015-12-31']),
- dataRow(['Alex', 'Fourth', '2014-11-30']),
- dataRow(['Katie', 'Fourth', '2014-07-30']),
- dataRow(['Thomas', 'Third', '2013-07-30'])
+ dataRow(['Robert', 'Fifth', %2015-12-30]),
+ dataRow(['Julie', 'Fifth', %2015-12-31]),
+ dataRow(['Alex', 'Fourth', %2014-11-30]),
+ dataRow(['Katie', 'Fourth', %2014-07-30]),
+ dataRow(['Thomas', 'Third', %2013-07-30])
]
),
// SELECT class, min(dob) AS result FROM testTable GROUP BY class ORDER BY result ASC NULLS LAST
diff --git a/pom.xml b/pom.xml
index 352fd7fb77f..163a06cf261 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1554,6 +1554,21 @@
legend-engine-xt-relationalStore-athena-pure${project.version}
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-PCT
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-sqlDialectTranslation-pure
+ ${project.version}
+
+
+ org.finos.legend.engine
+ legend-engine-xt-relationalStore-athena-SDT
+ ${project.version}
+ org.finos.legend.engine