-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for TPCH connector and TPCDS connector (#293)
# Description Needed for research of demo datasets
- Loading branch information
Showing
12 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
use serde::{Deserialize, Serialize}; | ||
use stackable_operator::schemars::{self, JsonSchema}; | ||
|
||
#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct TpcdsConnector {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
use serde::{Deserialize, Serialize}; | ||
use stackable_operator::schemars::{self, JsonSchema}; | ||
|
||
#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct TpchConnector {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use super::{config::CatalogConfig, FromTrinoCatalogError, ToCatalogConfig}; | ||
use async_trait::async_trait; | ||
use stackable_operator::client::Client; | ||
use stackable_trino_crd::catalog::tpcds::TpcdsConnector; | ||
|
||
pub const CONNECTOR_NAME: &str = "tpcds"; | ||
|
||
#[async_trait] | ||
impl ToCatalogConfig for TpcdsConnector { | ||
async fn to_catalog_config( | ||
&self, | ||
catalog_name: &str, | ||
_catalog_namespace: Option<String>, | ||
_client: &Client, | ||
) -> Result<CatalogConfig, FromTrinoCatalogError> { | ||
// No additional properties needed | ||
Ok(CatalogConfig::new(catalog_name.to_string(), CONNECTOR_NAME)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use super::{config::CatalogConfig, FromTrinoCatalogError, ToCatalogConfig}; | ||
use async_trait::async_trait; | ||
use stackable_operator::client::Client; | ||
use stackable_trino_crd::catalog::tpch::TpchConnector; | ||
|
||
pub const CONNECTOR_NAME: &str = "tpch"; | ||
|
||
#[async_trait] | ||
impl ToCatalogConfig for TpchConnector { | ||
async fn to_catalog_config( | ||
&self, | ||
catalog_name: &str, | ||
_catalog_namespace: Option<String>, | ||
_client: &Client, | ||
) -> Result<CatalogConfig, FromTrinoCatalogError> { | ||
// No additional properties needed | ||
Ok(CatalogConfig::new(catalog_name.to_string(), CONNECTOR_NAME)) | ||
} | ||
} |