Hisoka-X commented on code in PR #9774:
URL: https://github.com/apache/seatunnel/pull/9774#discussion_r2302977568
##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/CsvReadStrategy.java:
##########
@@ -78,6 +79,32 @@ public void read(String path, String tableId,
Collector<SeaTunnelRow> output)
resolveArchiveCompressedInputStream(path, tableId, output,
partitionsMap, FileFormat.CSV);
}
+ @Override
+ public void readSplit(
+ String filePath,
+ String tableId,
+ Collector<SeaTunnelRow> output,
+ long startOffset,
+ long length,
+ boolean isFirstSplit)
+ throws IOException, FileConnectorException {
+ Map<String, String> partitionsMap = parsePartitionsByPath(filePath);
+
+ // For compressed files, fall back to reading the entire file
+ if (compressFormat != CompressFormat.NONE) {
+ log.warn(
+ "File splitting is not supported for compressed CSV files,
reading entire file: {}",
+ filePath);
+ resolveArchiveCompressedInputStream(
+ filePath, tableId, output, partitionsMap, FileFormat.CSV);
Review Comment:
we should throw exception directly.
--
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]