Database UDF Execution via Segmented Environments

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database systems face challenges in managing user-defined functions (UDFs) across multiple execution environments due to differences in programming language versions and dependencies, leading to complex dependency management and limited functionality.

Innovation Solution

Implementing a database manager with a dependency resolver system that creates execution environments for different dependencies, allowing users to execute UDFs in multiple environments without managing packages or versions manually, and enabling automatic data translation between Python data types and native database formats.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a database system supports multiple programming language versions and dependencies for UDFs, then the functionality and adaptability are improved, but the device complexity and dependency management burden increase

Engineering Contradiction:
ImprovefunctionalityVSAvoiddependency management
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system segments the database environment into multiple isolated execution environments, each with its own dependency set. This allows different UDFs to run with different Python versions and packages without conflicting, resolving the complexity of managing multiple dependencies in a single shared environment.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary layer (the execution environment management system) that handles dependency resolution and environment configuration automatically. This intermediary abstracts away the complexity of manual dependency management from users while enabling support for multiple programming language versions and packages.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Manufacturing precision

If manual package and version management is required for UDFs, then control and precision are improved, but the ease of operation deteriorates

Engineering Contradiction:
ImprovecontrolVSAvoidease of operation
Core Design Contradiction:
Manufacturing precisionVSEase of operation

Solution Approach 1:

The system implements self-service automation where the execution environment automatically resolves dependencies, configures packages, and manages versions based on the UDF requirements. This eliminates manual package management while maintaining precise control over the execution environment through automated mechanisms.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary actions by pre-configuring execution environments with required dependencies and packages before UDF execution. This advance preparation ensures that the correct versions and packages are available when needed, maintaining precision without requiring users to manually manage these details during operation.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If data translation between Python data types and native database formats is implemented, then the adaptability is improved, but the processing time and complexity increase

Engineering Contradiction:
ImproveadaptabilityVSAvoidprocessing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent introduces data format translators as intermediary components that automatically convert between Python data types and native database formats. These translators handle the adaptation complexity internally, allowing seamless data exchange between different execution environments and the database system without requiring manual intervention or significant processing overhead.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20250068616A1PROCESSING USER-DEFINED FUNCTIONS (UDFs) USING MULTIPLE UDF CLIENTS
Publication Date: 2025.02.27 SNOWFLAKE INC
  • US20250068616A1 patent drawing
  • US20250068616A1 patent drawing
  • US20250068616A1 patent drawing

AI summary

A method to process UDFs includes performing, by at least one hardware processor of a database system, a resolution of application components to determine a plurality of resolved components of an application and a plurality of data types corresponding to the plurality of resolved components. The method includes instantiating a plurality of UDF clients. The plurality of UDF clients are associated with the plurality of data types. The method includes detecting a received database query specifies a data type of the plurality of data types. The method includes executing the received database query at a UDF client of the plurality of UDF clients.