mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-11-04 12:51:23 +00:00 
			
		
		
		
	fix(query_combiner): add try block to handle queries of type str (#4397)
Co-authored-by: Harshal Sheth <hsheth2@gmail.com>
This commit is contained in:
		
							parent
							
								
									a12c9d2a30
								
							
						
					
					
						commit
						bd3090ae86
					
				@ -213,7 +213,13 @@ class SQLAlchemyQueryCombiner:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        # Figure out how many columns this query returns.
 | 
					        # Figure out how many columns this query returns.
 | 
				
			||||||
        # This also implicitly ensures that the typing is generally correct.
 | 
					        # This also implicitly ensures that the typing is generally correct.
 | 
				
			||||||
        assert len(get_query_columns(query)) > 0
 | 
					        try:
 | 
				
			||||||
 | 
					            assert len(get_query_columns(query)) > 0
 | 
				
			||||||
 | 
					        except AttributeError as e:
 | 
				
			||||||
 | 
					            logger.debug(
 | 
				
			||||||
 | 
					                f"Query of type: '{type(query)}' does not contain attributes required by 'get_query_columns()'. AttributeError: {e}"
 | 
				
			||||||
 | 
					            )
 | 
				
			||||||
 | 
					            return False, None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Add query to the queue.
 | 
					        # Add query to the queue.
 | 
				
			||||||
        queue = self._get_queue(main_greenlet)
 | 
					        queue = self._get_queue(main_greenlet)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user