mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-11-04 04:29:13 +00:00 
			
		
		
		
	Handle null window metric (#10440)
* fix: handle null window metrics * fix: remove else from try/except pattern
This commit is contained in:
		
							parent
							
								
									ef1812a09d
								
							
						
					
					
						commit
						8bc0472fae
					
				@ -253,7 +253,6 @@ class SQAProfilerInterface(ProfilerProtocol, SQAInterfaceMixin):
 | 
				
			|||||||
            row = runner.select_first_from_sample(
 | 
					            row = runner.select_first_from_sample(
 | 
				
			||||||
                *[metric(column).fn() for metric in metrics]
 | 
					                *[metric(column).fn() for metric in metrics]
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
            return dict(row)
 | 
					 | 
				
			||||||
        except Exception as exc:
 | 
					        except Exception as exc:
 | 
				
			||||||
            logger.debug(traceback.format_exc())
 | 
					            logger.debug(traceback.format_exc())
 | 
				
			||||||
            logger.warning(
 | 
					            logger.warning(
 | 
				
			||||||
@ -261,6 +260,9 @@ class SQAProfilerInterface(ProfilerProtocol, SQAInterfaceMixin):
 | 
				
			|||||||
            )
 | 
					            )
 | 
				
			||||||
            session.rollback()
 | 
					            session.rollback()
 | 
				
			||||||
            raise RuntimeError(exc)
 | 
					            raise RuntimeError(exc)
 | 
				
			||||||
 | 
					        if row:
 | 
				
			||||||
 | 
					            return dict(row)
 | 
				
			||||||
 | 
					        return None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @_get_metrics.register(MetricTypes.System.value)
 | 
					    @_get_metrics.register(MetricTypes.System.value)
 | 
				
			||||||
    def _(
 | 
					    def _(
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user