This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-paimon-presto.git


The following commit(s) were added to refs/heads/main by this push:
     new 5aac0bf  [bug] Fix thread classloader in PrestoPageSourceBase
5aac0bf is described below

commit 5aac0bf5bb8e2494eeaa6e83fd81125b1c050b60
Author: Jingsong <[email protected]>
AuthorDate: Wed Jul 26 14:33:15 2023 +0800

    [bug] Fix thread classloader in PrestoPageSourceBase
---
 .../org/apache/paimon/presto/PrestoPageSourceBase.java     | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git 
a/paimon-presto-common/src/main/java/org/apache/paimon/presto/PrestoPageSourceBase.java
 
b/paimon-presto-common/src/main/java/org/apache/paimon/presto/PrestoPageSourceBase.java
index 1a02be4..6109c67 100644
--- 
a/paimon-presto-common/src/main/java/org/apache/paimon/presto/PrestoPageSourceBase.java
+++ 
b/paimon-presto-common/src/main/java/org/apache/paimon/presto/PrestoPageSourceBase.java
@@ -115,11 +115,15 @@ public abstract class PrestoPageSourceBase implements 
ConnectorPageSource {
 
     @Override
     public Page getNextPage() {
-        try {
-            return nextPage();
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
+        return ClassLoaderUtils.runWithContextClassLoader(
+                () -> {
+                    try {
+                        return nextPage();
+                    } catch (IOException e) {
+                        throw new UncheckedIOException(e);
+                    }
+                },
+                PrestoPageSourceBase.class.getClassLoader());
     }
 
     @Override

Reply via email to