in paimon-presto-common/src/main/java/org/apache/paimon/presto/PrestoPropertyUtils.java [38:61]
public static String getScanVersion(String scanVersion, Identifier identifier) {
if (isGlobalScanOption(scanVersion)) {
// return scan version directly for global option format
return scanVersion.trim();
}
String[] tableScanOptions = scanVersion.trim().split(TABLE_SCAN_OPTIONS_SPLITTER);
String tableScanVersion = "";
for (String tableScanOption : tableScanOptions) {
String tableOptionsTemplate =
String.format(
TABLE_SCAN_OPTIONS_TEMPLATE,
identifier.getDatabaseName(),
identifier.getObjectName());
Pattern tableOptionsPattern = Pattern.compile(tableOptionsTemplate);
Matcher matcher = tableOptionsPattern.matcher(tableScanOption.trim());
if (matcher.find()) {
return matcher.group(3).trim();
}
}
return tableScanVersion;
}