Gabriel39 commented on code in PR #70919:
URL: https://github.com/apache/doris/pull/70919#discussion_r4690609650


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/split/FileSplitter.java:
##########
@@ -111,7 +126,11 @@ public List<Split> splitFile(
             blockLocations[0] = new FileBlockLocation(null, 0L, length);
         }
         List<Split> result = Lists.newArrayList();
-        TFileCompressType compressType = 
Util.inferFileCompressTypeByPath(path.getNormalizedLocation());
+        // Match schema inference and BE ranges: explicit GZ may have no 
suffix, and PLAIN may end in .gz.
+        // Parquet/ORC leave the envelope codec unset because their 
compression is internal to the file.
+        TFileCompressType compressType = Util.getOrInferCompressType(
+                configuredCompression == null ? TFileCompressType.UNKNOWN : 
configuredCompression,

Review Comment:
   Addressed in de49ca66c4. TVF format eligibility now keeps CSV whole when the 
analyzed enclose byte is active, independently of compression and count 
policies. The full-row regression reproduces the quoted multiline payload with 
and without a .gz suffix: IDs 0,1,2,3 before the fix become only IDs 0,3. Added 
positive controls for ordinary CSV and single-record prefixes. All 86 FE tests 
and 36 local S3 variants pass, including normal result-file replay.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/tvf/source/TVFScanNode.java:
##########
@@ -161,6 +161,7 @@ public List<Split> getSplits(int numBackends) throws 
UserException {
                         fileStatus.getSize(),
                         fileStatus.getModificationTime(),
                         fileStatus.isSplitable && needSplit,
+                        tableValuedFunction.getTFileCompressType(),

Review Comment:
   Addressed in de49ca66c4. JSON splitting now uses the effective serialized 
read_json_by_line flag, so document mode remains whole even when selected 
implicitly by strip_outer_array. Tests cover explicit and implicit object/array 
document modes, both suffix variants, and line-oriented arrays that should 
still split. The baseline truncation error is reproduced; all 86 FE tests and 
36 local S3 variants pass, including full-value comparisons and normal replay.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/split/FileSplitter.java:
##########
@@ -111,7 +126,11 @@ public List<Split> splitFile(
             blockLocations[0] = new FileBlockLocation(null, 0L, length);
         }
         List<Split> result = Lists.newArrayList();
-        TFileCompressType compressType = 
Util.inferFileCompressTypeByPath(path.getNormalizedLocation());
+        // Match schema inference and BE ranges: explicit GZ may have no 
suffix, and PLAIN may end in .gz.
+        // Parquet/ORC leave the envelope codec unset because their 
compression is internal to the file.
+        TFileCompressType compressType = Util.getOrInferCompressType(

Review Comment:
   Addressed in de49ca66c4. CSV and Hive Text now keep multi-record prefixes in 
a whole-file range. CSV header mode takes precedence over skip_lines, including 
the two-record names-and-types header. Single-record prefixes remain 
splittable. Added full-row cases with 20 valid 64-byte preamble records 
crossing the first 1-KiB range, plus long one/two-record header controls, with 
both suffix variants. The four leaked baseline records are excluded after the 
fix; all 86 FE tests and 36 local S3 variants pass.



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