SinghManishKuma's avatar
SinghManishKuma
Regular Visitor
1 month ago
Status:
New

Potential Fabric Runtime 2.0 Issue - ANALYZE TABLE Fails for Fully Qualified Table Names

 

We have identified a potential issue in Microsoft Fabric Runtime 2.0 related to the ANALYZE TABLE ... COMPUTE STATISTICS FOR ALL COLUMNS command when used with schema-qualified Delta table names. 

 

Environment 

 

  • Microsoft Fabric 
    • Fabric Runtime 2.0 
      • Delta Tables 
        • Schema-enabled Lakehouse 

           

          Issue Details 

           

          The table exists and is accessible through Spark SQL commands such as: 

          DESCRIBE DETAIL schema_wrk.stg_table; 

          This command executes successfully. 

          However, when running: 

          ANALYZE TABLE schema_wrk.stg_table 
          COMPUTE STATISTICS FOR ALL COLUMNS; 

          the command fails with: 

          [TABLE_OR_VIEW_NOT_FOUND] 
          The table or view 'stg_table' cannot be found. 

          The stack trace references: 

          UnresolvedRelation [stg_table] 

          This suggests the command is attempting to resolve only the table name rather than the fully qualified table name. 

           

          Workaround 

           

          The same command succeeds after explicitly setting the schema context: 

          USE schema_wrk; 
           
          ANALYZE TABLE stg_table 
          COMPUTE STATISTICS FOR ALL COLUMNS; 

           

          Expected Behaviour 

           

          The following command should execute successfully without requiring a preceding USE statement: 

          ANALYZE TABLE schema_wrk.stg_table 
          COMPUTE STATISTICS FOR ALL COLUMNS; 

           

          Actual Behaviour 

           

          The command fails with TABLE_OR_VIEW_NOT_FOUND, despite: 

          • The table existing 
            • DESCRIBE DETAIL working successfully 
              • No permission issues being present 

                 

                Observations 

                • Issue is reproducible across multiple tables. 
                  • Fully qualified table names appear to work with DESCRIBE DETAIL. 
                    • ANALYZE TABLE ... FOR ALL COLUMNS appears to internally resolve only the table name. 
                      • Using USE <schema> is a valid workaround. 
                        • This suggests a potential namespace resolution issue within the DeltaAnalyzeTableCommand path. 
                           fabriccommunity
No CommentsBe the first to comment

Recent ideas