@@ -463,9 +463,14 @@ func newInsertSourceSelector(sel RuleSelector) RuleSelector {
463463
464464// Analyze applies the transformation rules to the node given. In the case of an error, the last successfully
465465// transformed node is returned along with the error.
466- func (a * Analyzer ) Analyze (ctx * sql.Context , n sql.Node , scope * plan.Scope , qFlags * sql.QueryFlags ) (sql.Node , error ) {
467- n , _ , err := a .analyzeWithSelector (ctx , n , scope , SelectAllBatches , DefaultRuleSelector , qFlags )
468- return n , err
466+ func (a * Analyzer ) Analyze (ctx * sql.Context , node sql.Node , scope * plan.Scope , qFlags * sql.QueryFlags ) (sql.Node , error ) {
467+ switch n := node .(type ) {
468+ case * plan.DescribeQuery :
469+ child , _ , err := a .analyzeWithSelector (ctx , n .Query (), scope , SelectAllBatches , DefaultRuleSelector , qFlags )
470+ return n .WithQuery (child ), err
471+ }
472+ node , _ , err := a .analyzeWithSelector (ctx , node , scope , SelectAllBatches , DefaultRuleSelector , qFlags )
473+ return node , err
469474}
470475
471476func (a * Analyzer ) analyzeThroughBatch (ctx * sql.Context , n sql.Node , scope * plan.Scope , until string , sel RuleSelector , qFlags * sql.QueryFlags ) (sql.Node , transform.TreeIdentity , error ) {
0 commit comments