vgi.exceptions
Module overview
Exception classes for VGI.
This module defines custom exceptions used throughout the VGI framework.
class BindStateNotFoundError
Section titled âclass BindStateNotFoundErrorâBases: Exception
Description
Raised when init is called with invalid or missing bind_data.
This exception is raised when:
- INIT invocation is missing bind_data field
- The bind_data is corrupted or cannot be deserialized
- The function_name in bind state doesnât match the invocation
The client should catch this and provide a clear error message indicating that a BIND call must be made before INIT.
class CatalogReadOnlyError
Section titled âclass CatalogReadOnlyErrorâBases: Exception
Description
Raised when a DDL operation is attempted on a read-only catalog.
This exception is raised by ReadOnlyCatalogInterface when any create, drop, rename, or modify operation is attempted.
Read-only catalogs only support:
- catalogs() - list catalogs
- catalog_attach/detach - attach to/detach from catalogs
- schemas() - list schemas
- schema_get() - get schema info
- schema_contents() - list schema contents
- table_get(), view_get() - get table/view info
- table_scan_function_get() - get scan function for tables
class ExecutionIdentifierError
Section titled âclass ExecutionIdentifierErrorâBases: ValueError
Description
Raised when an operation requires an execution_identifier that hasnât been set.
This typically occurs when:
- store_state() is called before initialize_global_state() or load_global_state()
- collect_states() is called before initialize_global_state() or load_global_state()
- Work queue operations are attempted before initialization
The execution_identifier is automatically set during:
- initialize_global_state() for the primary worker
- load_global_state() for secondary workers
Resolution:
- Ensure your function calls super().initialize_global_state()
- Ensure the worker correctly calls load_global_state() for secondary workers
class SchemaValidationError
Section titled âclass SchemaValidationErrorâBases: Exception
Description
Raised when a batch schema doesnât match the expected schema.
This error is raised by the framework during input/output validation. It indicates a programming error where a batch doesnât conform to the declared schema.
The error message includes detailed information about what differs:
- Missing fields (in expected but not in actual)
- Extra fields (in actual but not in expected)
- Type mismatches (same field name, different types)
- Field order differences
Attributes
attribute context
Section titled âattribute contextâstr
Description of where the validation occurred.