Skip to content

Commit

Permalink
Databricks PCT setup (finos#3378)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumyok authored Jan 29, 2025
1 parent 8b4b812 commit d226076
Show file tree
Hide file tree
Showing 16 changed files with 1,196 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,11 @@
<artifactId>legend-engine-xt-relationalStore-snowflake-PCT</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-databricks-PCT</artifactId>
<scope>runtime</scope>
</dependency>
<!-- PCT -->

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ public class CoreExternalTestConnectionCodeRepositoryProvider implements CodeRep
"meta::relational::tests::pct::testAdapterForRelationalWithPostgresExecution_Function_1__X_o_"
);

public static final Adapter databricksAdapter = new Adapter(
"Databricks",
"Store_Relational",
"meta::relational::tests::pct::testAdapterForRelationalWithDatabricksExecution_Function_1__X_o_"
);

@Override
public CodeRepository repository()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ function <<PCT.adapter>> {PCT.adapterName='Snowflake'} meta::relational::tests::
)
}

function <<PCT.adapter>> {PCT.adapterName='Databricks'} meta::relational::tests::pct::testAdapterForRelationalWithDatabricksExecution<X|o>(f:Function<{->X[o]}>[1]):X[o]
{
meta::relational::tests::pct::testAdapterForRelationalExecution(
$f,
meta::pure::testConnection::getTestConnection(DatabaseType.Databricks)
)
}

function meta::relational::tests::pct::extractDependentFunctions(f:Any[1]):Function<Any>[*]
{
$f->match([
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-databricks</artifactId>
<version>4.69.1-SNAPSHOT</version>
</parent>

<artifactId>legend-engine-xt-relationalStore-databricks-PCT</artifactId>
<packaging>jar</packaging>
<name>Legend Engine - XT - Relational Store - Databricks - PCT</name>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>run-cloud-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-maven-generation-pct</artifactId>
<configuration>
<mode>Compiled</mode>
<targetDir>${project.build.directory}/classes/pct-reports/</targetDir>
<PCTTestSuites>
<PCTTestSuite>
org.finos.legend.engine.plan.execution.stores.relational.test.databricks.pct.Test_Relational_Databricks_StandardFunctions_PCT
</PCTTestSuite>
<PCTTestSuite>
org.finos.legend.engine.plan.execution.stores.relational.test.databricks.pct.Test_Relational_Databricks_EssentialFunctions_PCT
</PCTTestSuite>
<PCTTestSuite>
org.finos.legend.engine.plan.execution.stores.relational.test.databricks.pct.Test_Relational_Databricks_GrammarFunctions_PCT
</PCTTestSuite>
<PCTTestSuite>
org.finos.legend.engine.plan.execution.stores.relational.test.databricks.pct.Test_Relational_Databricks_RelationFunctions_PCT
</PCTTestSuite>
</PCTTestSuites>
</configuration>
<executions>
<execution>
<id>PCT-Generation</id>
<phase>process-test-classes</phase>
<goals>
<goal>generate-pct-report</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-platform-java</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-functions-standard-pure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-platform-dsl-tds-java</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-compiled-functions-relation</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-compiled-functions-relationalStore-PCT</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<dependencies>
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-api</artifactId>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-shared-vault-core</artifactId>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-databricks-protocol</artifactId>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-executionPlan-connection</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-protocol</artifactId>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-test-framework</artifactId>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-functions-standard-pure</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-functions-relation-pure</artifactId>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-functions-relationalStore-PCT-pure</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-compiled-functions-relationalStore-PCT</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-databricks-grammar</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-databricks-execution</artifactId>
<scope>runtime</scope>
</dependency>


<!-- TEST -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m3-core</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-runtime-java-engine-compiled</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-code-compiled-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-platform-dsl-tds-java</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-compiled-functions-relation</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-javaPlatformBinding-pure</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-functions-planExecution-pure</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-compiled-functions-planExecution</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-shared-functions-planExecution</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-compiled-functions-pureExtensions</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-core-pure</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-executionPlan</artifactId>
<scope>test</scope>
</dependency>
<!-- TEST -->
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// 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.databricks.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_Databricks_PCTReportProvider implements PCTReportProvider
{
@Override
public MutableList<Functions> getFunctions()
{
return Lists.mutable.empty();
}

@Override
public MutableList<AdapterReport> getAdapterReports()
{
return PCTReportProviderTool.load(Core_Relational_Databricks_PCTReportProvider.class.getClassLoader(), AdapterReport.class,
"pct-reports/ADAPTER_standard_compiled_Databricks.json",
"pct-reports/ADAPTER_unclassified_compiled_Databricks.json",
"pct-reports/ADAPTER_grammar_compiled_Databricks.json",
"pct-reports/ADAPTER_relation_compiled_Databricks.json"
);
}
}
Loading

0 comments on commit d226076

Please sign in to comment.