wForget commented on code in PR #1555:
URL: https://github.com/apache/datafusion-comet/pull/1555#discussion_r2004673918


##########
native/core/src/parquet/mod.rs:
##########
@@ -641,6 +640,8 @@ pub unsafe extern "system" fn 
Java_org_apache_comet_parquet_Native_initRecordBat
     session_timezone: jstring,
 ) -> jlong {
     try_unwrap_or_throw(&e, |mut env| unsafe {
+        let task_ctx = TaskContext::default();

Review Comment:
   > Both TaskContext::default() and SessionContext::new() get a 
RuntimeEnv::default(). So how does this change things?
   
   If I understand correctly, although they both call `RuntimeEnv::default()` 
but both get a new object.
   
   A simple reproduction:
   
   ```
   struct N {
       n: i32,
   }
   
   impl Default for N {
       fn default() -> Self {
           N { n: 0 }
       }
   }
   
   let mut a = N::default();
   let mut b = N::default();
   a.n = 1;
   assert_eq!(a.n, b.n);
   ```
   
   got an error:
   
   ```
   assertion `left == right` failed
     left: 1
    right: 0
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to