[bugfix](iceberg)Fix the datafile path error issue for 2.1 (#36066)
bp: #35957
This commit is contained in:
@ -143,6 +143,7 @@ public class IcebergScanNode extends FileQueryScanNode {
|
||||
TIcebergFileDesc fileDesc = new TIcebergFileDesc();
|
||||
int formatVersion = icebergSplit.getFormatVersion();
|
||||
fileDesc.setFormatVersion(formatVersion);
|
||||
fileDesc.setOriginalFilePath(icebergSplit.getOriginalPath());
|
||||
if (formatVersion < MIN_DELETE_FILE_SUPPORT_VERSION) {
|
||||
fileDesc.setContent(FileContent.DATA.id());
|
||||
} else {
|
||||
@ -253,7 +254,8 @@ public class IcebergScanNode extends FileQueryScanNode {
|
||||
new String[0],
|
||||
formatVersion,
|
||||
source.getCatalog().getProperties(),
|
||||
partitionValues);
|
||||
partitionValues,
|
||||
splitTask.file().path().toString());
|
||||
if (formatVersion >= MIN_DELETE_FILE_SUPPORT_VERSION) {
|
||||
split.setDeleteFileFilters(getDeleteFileFilters(splitTask));
|
||||
}
|
||||
|
||||
@ -28,13 +28,16 @@ import java.util.Map;
|
||||
@Data
|
||||
public class IcebergSplit extends FileSplit {
|
||||
|
||||
private final String originalPath;
|
||||
|
||||
// File path will be changed if the file is modified, so there's no need to get modification time.
|
||||
public IcebergSplit(Path file, long start, long length, long fileLength, String[] hosts,
|
||||
Integer formatVersion, Map<String, String> config,
|
||||
List<String> partitionList) {
|
||||
List<String> partitionList, String originalPath) {
|
||||
super(file, start, length, fileLength, hosts, partitionList);
|
||||
this.formatVersion = formatVersion;
|
||||
this.config = config;
|
||||
this.originalPath = originalPath;
|
||||
}
|
||||
|
||||
private Integer formatVersion;
|
||||
|
||||
Reference in New Issue
Block a user