Skip to content
Query.Farm
Talk with Us

vgi.exceptions

Module overview

Exception classes for VGI.

This module defines custom exceptions used throughout the VGI framework.

source

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.

source

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
source

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
source

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

pa.Schema | None

The expected Arrow schema.

pa.Schema | None

The actual Arrow schema that was received.

str

Description of where the validation occurred.