Weijun-H commented on code in PR #19687:
URL: https://github.com/apache/datafusion/pull/19687#discussion_r2671694511


##########
datafusion/datasource-json/src/source.rs:
##########
@@ -188,23 +187,51 @@ impl FileOpener for JsonOpener {
         let file_compression_type = self.file_compression_type.to_owned();
 
         Ok(Box::pin(async move {
-            let calculated_range =
-                calculate_range(&partitioned_file, &store, None).await?;
+            let file_size = partitioned_file.object_meta.size as usize;
+            let location = &partitioned_file.object_meta.location;
 
-            let range = match calculated_range {
-                RangeCalculation::Range(None) => None,
-                RangeCalculation::Range(Some(range)) => Some(range.into()),
-                RangeCalculation::TerminateEarly => {
+            let file_range = if file_compression_type.is_compressed() {
+                None
+            } else {
+                partitioned_file.range.clone()
+            };
+
+            if let Some(file_range) = file_range.as_ref() {
+                let raw_start = file_range.start as usize;
+                let raw_end = file_range.end as usize;

Review Comment:
   fix in 
https://github.com/apache/datafusion/pull/19687/commits/c188abcecefbb2065dcea28535128cb2c0aa089d



-- 
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