Skip to content

Commit 0dc73ad

Browse files
committed
feat(query): system.columns filter view engine fields
1 parent d785e75 commit 0dc73ad

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/query/storages/system/src/columns_table.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,18 @@ impl ColumnsTable {
144144
.await?
145145
{
146146
let fields = if table.engine() == VIEW_ENGINE {
147-
if let Some(query) = table.options().get(QUERY) {
148-
let mut planner = Planner::new(ctx.clone());
149-
let (plan, _) = planner.plan_sql(query).await?;
150-
let schema = infer_table_schema(&plan.schema())?;
151-
schema.fields().clone()
152-
} else {
153-
return Err(ErrorCode::Internal(
154-
"Logical error, View Table must have a SelectQuery inside.",
155-
));
156-
}
147+
// information_schema.columns is a view that will query system.columns
148+
// if let Some(query) = table.options().get(QUERY) {
149+
// let mut planner = Planner::new(ctx.clone());
150+
// let (plan, _) = planner.plan_sql(query).await?;
151+
// let schema = infer_table_schema(&plan.schema())?;
152+
// schema.fields().clone()
153+
// } else {
154+
// return Err(ErrorCode::Internal(
155+
// "Logical error, View Table must have a SelectQuery inside.",
156+
// ));
157+
// }
158+
continue;
157159
} else {
158160
table.schema().fields().clone()
159161
};

0 commit comments

Comments
 (0)