fix: DH-22075: Improve Groovy/QueryLibrary/QLP classloader handling#7829
Open
niloc132 wants to merge 13 commits intodeephaven:mainfrom
Open
fix: DH-22075: Improve Groovy/QueryLibrary/QLP classloader handling#7829niloc132 wants to merge 13 commits intodeephaven:mainfrom
niloc132 wants to merge 13 commits intodeephaven:mainfrom
Conversation
Contributor
No docs changes detected for 062e845 |
niloc132
commented
Mar 23, 2026
engine/context/src/main/java/io/deephaven/engine/context/QueryLibrary.java
Show resolved
Hide resolved
| updateVersionString(); | ||
| } | ||
|
|
||
| @Deprecated |
Member
Author
There was a problem hiding this comment.
not sure if we want to deprecate or not - i don't have this new impl, where the caller gets specifics for their classloader? will need release notes for any potential users (probably none exist).
5a44bbd to
dd785d0
Compare
cpwright
reviewed
Mar 26, 2026
| import org.junit.Rule; | ||
| import org.junit.Test; | ||
| import org.junit.experimental.categories.Category; | ||
| import org.objectweb.asm.ClassWriter; |
engine/context/src/main/java/io/deephaven/engine/context/QueryLibrary.java
Show resolved
Hide resolved
| ClassLoader cl2 = makeClassloaderWithClass(binaryName, 456); | ||
| Class<?> aClass2 = cl2.loadClass(binaryName); | ||
| assertNotEquals(aClass, aClass2); | ||
| Thread.currentThread().setContextClassLoader(cl2); |
Contributor
There was a problem hiding this comment.
Should we have an @AfterEach to clean up the context classloader?
Member
Author
There was a problem hiding this comment.
Or at least a try/finally, yeah, that would be wise.
|
|
||
| Table t1 = session.getQueryScope().readParamValue("t1"); | ||
| Table t2 = session.getQueryScope().readParamValue("t2"); | ||
| try { |
Contributor
There was a problem hiding this comment.
A better pattern is like this:
final IllegalArgumentException iae =
assertThrows(IllegalArgumentException.class, () -> arraySource.countBy("Count", "Key"));
assertEquals("Cannot aggregate using an array column: Key, column type is an array of int", iae.getMessage());
| "}\n" + | ||
| "ExecutionContext.getContext().getQueryLibrary().importStatic(MyClass)\n" + | ||
| "t = TestGroovyDeephavenSession.makeTickingTable()\n" + | ||
| // "pt = t.partitionBy('I').transform(ExecutionContext.getContext(), { t -> if (t.size() != |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.