Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions rust/cubesql/cubesql/src/compile/engine/context_mysql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@ use std::sync::Arc;

use datafusion::datasource::{self, TableProvider};

use super::information_schema::mysql::{
collations::InfoSchemaCollationsProvider as MySqlSchemaCollationsProvider,
columns::InfoSchemaColumnsProvider as MySqlSchemaColumnsProvider,
key_column_usage::InfoSchemaKeyColumnUsageProvider as MySqlSchemaKeyColumnUsageProvider,
processlist::InfoSchemaProcesslistProvider as MySqlSchemaProcesslistProvider,
referential_constraints::InfoSchemaReferentialConstraintsProvider as MySqlSchemaReferentialConstraintsProvider,
schemata::InfoSchemaSchemataProvider as MySqlSchemaSchemataProvider,
statistics::InfoSchemaStatisticsProvider as MySqlSchemaStatisticsProvider,
tables::InfoSchemaTableProvider as MySqlSchemaTableProvider,
variables::PerfSchemaVariablesProvider as MySqlPerfSchemaVariablesProvider,
};
use crate::{
compile::{
engine::{CubeContext, CubeTableProvider, TableName},
Expand All @@ -29,24 +18,6 @@ impl DatabaseProtocol {
let any = table_provider.as_any();
Ok(if let Some(t) = any.downcast_ref::<CubeTableProvider>() {
t.table_name().to_string()
} else if let Some(t) = any.downcast_ref::<MySqlSchemaTableProvider>() {
t.table_name().to_string()
} else if let Some(t) = any.downcast_ref::<MySqlSchemaColumnsProvider>() {
t.table_name().to_string()
} else if let Some(t) = any.downcast_ref::<MySqlSchemaStatisticsProvider>() {
t.table_name().to_string()
} else if let Some(t) = any.downcast_ref::<MySqlSchemaKeyColumnUsageProvider>() {
t.table_name().to_string()
} else if let Some(t) = any.downcast_ref::<MySqlSchemaSchemataProvider>() {
t.table_name().to_string()
} else if let Some(t) = any.downcast_ref::<MySqlSchemaReferentialConstraintsProvider>() {
t.table_name().to_string()
} else if let Some(t) = any.downcast_ref::<MySqlSchemaCollationsProvider>() {
t.table_name().to_string()
} else if let Some(t) = any.downcast_ref::<MySqlPerfSchemaVariablesProvider>() {
t.table_name().to_string()
} else if let Some(t) = any.downcast_ref::<MySqlSchemaProcesslistProvider>() {
t.table_name().to_string()
} else {
return Err(CubeError::internal(format!(
"Unknown table provider with schema: {:?}",
Expand Down Expand Up @@ -88,51 +59,6 @@ impl DatabaseProtocol {
return None;
}
}
"information_schema" => match table.as_str() {
"tables" => {
return Some(Arc::new(MySqlSchemaTableProvider::new(
context.meta.clone(),
)))
}
"columns" => {
return Some(Arc::new(MySqlSchemaColumnsProvider::new(
context.meta.clone(),
)))
}
"statistics" => return Some(Arc::new(MySqlSchemaStatisticsProvider::new())),
"key_column_usage" => {
return Some(Arc::new(MySqlSchemaKeyColumnUsageProvider::new()))
}
"schemata" => return Some(Arc::new(MySqlSchemaSchemataProvider::new())),
"processlist" => {
return Some(Arc::new(MySqlSchemaProcesslistProvider::new(
context.sessions.clone(),
)))
}
"referential_constraints" => {
return Some(Arc::new(MySqlSchemaReferentialConstraintsProvider::new()))
}
"collations" => return Some(Arc::new(MySqlSchemaCollationsProvider::new())),
_ => return None,
},
"performance_schema" => match table.as_str() {
"global_variables" => {
return Some(Arc::new(MySqlPerfSchemaVariablesProvider::new(
"performance_schema.global_variables".to_string(),
context
.sessions
.server
.all_variables(context.session_state.protocol.clone()),
)))
}
"session_variables" => {
return Some(Arc::new(MySqlPerfSchemaVariablesProvider::new(
"performance_schema.session_variables".to_string(),
context.session_state.all_variables(),
)))
}
_ => return None,
},
_ => return None,
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod mysql;
pub mod postgres;
pub mod redshift;
pub mod utils;

This file was deleted.

Loading
Loading