File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
internal/stackql/astanalysis/earlyanalysis Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -843,16 +843,13 @@ func (v *indirectExpandAstVisitor) Visit(node sqlparser.SQLNode) error {
843843 cteName := node .Name .GetRawVal ()
844844 if cte , isCTE := v .cteRegistry [cteName ]; isCTE {
845845 // This is a CTE reference - create and register an indirect.
846- // CTEs are handled differently from views/subqueries - their SELECT
847- // is already processed when we visit the WITH clause .
846+ // The CTE's inner SELECT has already been visited when processing
847+ // the WITH clause, so the API tables within it will be processed .
848848 indirect , err := astindirect .NewCTEIndirect (cte )
849849 if err != nil {
850850 return err
851851 }
852852 v .annotatedAST .SetIndirect (node , indirect )
853- // Mark that we contain native backend material since CTE results
854- // are stored in the SQL backend.
855- v .containsNativeBackendMaterial = true
856853 return nil
857854 }
858855 containsBackendMaterial := v .handlerCtx .GetDBMSInternalRouter ().ExprIsRoutable (node )
You can’t perform that action at this time.
0 commit comments