acryl-datahub 1.1.0.3rc1__py3-none-any.whl → 1.1.0.4rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of acryl-datahub might be problematic. Click here for more details.

@@ -1486,6 +1486,28 @@ def _sqlglot_lineage_nocache(
1486
1486
  )
1487
1487
  except Exception as e:
1488
1488
  return SqlParsingResult.make_from_error(e)
1489
+ except BaseException as e:
1490
+ # Check if this is a PanicException from SQLGlot's Rust tokenizer
1491
+ # We use runtime type checking instead of isinstance() because pyo3_runtime
1492
+ # is only available when sqlglot[rs] is installed and may not be importable
1493
+ # at module load time, but the exception can still be raised at runtime
1494
+ if (
1495
+ e.__class__.__name__ == "PanicException"
1496
+ and e.__class__.__module__ == "pyo3_runtime"
1497
+ ):
1498
+ # Handle pyo3_runtime.PanicException from SQLGlot's Rust tokenizer.
1499
+ # pyo3_runtime.PanicException inherits from BaseException (like SystemExit or
1500
+ # KeyboardInterrupt) rather than Exception, so it bypasses normal exception handling.
1501
+ # Avoid catching BaseException, as it includes KeyboardInterrupt
1502
+ # and would prevent Ctrl+C from working.
1503
+ wrapped_exception = Exception(
1504
+ f"pyo3_runtime.PanicException during SQL parsing: {e}"
1505
+ )
1506
+ wrapped_exception.__cause__ = e
1507
+ return SqlParsingResult.make_from_error(wrapped_exception)
1508
+ else:
1509
+ # Re-raise other BaseException types (SystemExit, KeyboardInterrupt, etc.)
1510
+ raise
1489
1511
 
1490
1512
 
1491
1513
  _sqlglot_lineage_cached = functools.lru_cache(maxsize=SQL_PARSE_RESULT_CACHE_SIZE)(