mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-05 22:34:22 +03:00
do not replace tablescans for information_schema (#764)
We shouldn't be replacing 'TableScan's for `information_schema` and `hasura` schemas. Previously, we only had a check for `hasura` schema, this PR now includes a check for `information_schema`. Queries on `information_schema` will now work. V3_GIT_ORIGIN_REV_ID: b25276556027b52ff940ddd3d094ea20f6fc7538
This commit is contained in:
parent
8af78227a0
commit
44a8fcd0f4
@ -36,7 +36,7 @@ use metadata_resolve::{self as resolved};
|
|||||||
use open_dds::identifier::Identifier;
|
use open_dds::identifier::Identifier;
|
||||||
use open_dds::types::FieldName;
|
use open_dds::types::FieldName;
|
||||||
|
|
||||||
use crate::plan::NDCQuery;
|
use crate::{catalog::introspection::HASURA_METADATA_SCHEMA, plan::NDCQuery};
|
||||||
|
|
||||||
/// Analyzed rule that inlines TableScan that provide a [`LogicalPlan`]
|
/// Analyzed rule that inlines TableScan that provide a [`LogicalPlan`]
|
||||||
/// (DataFrame / ViewTable)
|
/// (DataFrame / ViewTable)
|
||||||
@ -92,7 +92,9 @@ fn analyze_internal(
|
|||||||
projected_schema,
|
projected_schema,
|
||||||
filters: _,
|
filters: _,
|
||||||
fetch: _,
|
fetch: _,
|
||||||
}) if table_name.schema() != Some("hasura") => {
|
}) if table_name.schema() != Some(HASURA_METADATA_SCHEMA)
|
||||||
|
&& table_name.schema() != Some("information_schema") =>
|
||||||
|
{
|
||||||
let table = catalog.get(default_schema, &table_name).ok_or_else(|| {
|
let table = catalog.get(default_schema, &table_name).ok_or_else(|| {
|
||||||
DataFusionError::Internal(format!(
|
DataFusionError::Internal(format!(
|
||||||
"table provider not found for replace_table_scan: {table_name}"
|
"table provider not found for replace_table_scan: {table_name}"
|
||||||
|
Loading…
Reference in New Issue
Block a user