Class ChildFirstUdfClassLoader

All Implemented Interfaces:
Closeable, AutoCloseable

public final class ChildFirstUdfClassLoader extends URLClassLoader
Classloader for IMPORTS handler jars that prefers the jar (and its stage-sibling dependency jars) over the engine's classpath — the equivalent of Snowflake running a UDF against the dependency set its PACKAGES clause supplies, not against whatever the warehouse happens to have loaded. Without this, a handler built against one library version silently ran against the engine's copy: the vendor plugin-output parsers (generated with ANTLR 4.11) picked up the engine's ANTLR 4.13 runtime, warning on every call and mis-recovering on inputs their own runtime parses cleanly.

Classes the handler must SHARE with the engine stay parent-first: JDK classes, the engine's own dev.frostlake types, the com.snowflake Snowpark bridge (a procedure's Session argument must be the engine's class, not a copy from the jar), and SLF4J so logging binds once.