Code review comment: Why don't always add backtick, seems this condition is a little redundant

Code before review:
public void execute() throws Exception {
Map<String, String> params = new HashMap<>();
params.put("internalDB", FeConstants.INTERNAL_DB_NAME);
params.put("histogramStatTbl", StatisticConstants.HISTOGRAM_TBL_NAME);
params.put("catalogId", String.valueOf(catalog.getId()));
params.put("dbId", String.valueOf(db.getId()));
params.put("tblId", String.valueOf(tbl.getId()));
params.put("idxId", "-1");
params.put("colId", String.valueOf(info.colName));
params.put("dbName", info.dbName);
params.put("tblName", String.valueOf(info.tblName));
params.put("colName", String.valueOf(info.colName));
params.put("sampleRate", String.valueOf(info.sampleRate));
params.put("maxBucketNum", String.valueOf(info.maxBucketNum));
params.put("percentValue", String.valueOf((int) (info.sampleRate * 100)));
String histogramSql;
Set<String> partitionNames = info.partitionNames;
if (partitionNames.isEmpty()) {
StringSubstitutor stringSubstitutor = new StringSubstitutor(params);
histogramSql = stringSubstitutor.replace(ANALYZE_HISTOGRAM_SQL_TEMPLATE_TABLE);
} else {
try {
tbl.readLock();
String partNames = partitionNames.stream()
.filter(x -> tbl.getPartition(x) != null)
.map(partName -> SqlScanner
.isKeyword(partName) ? "`" + partName + "`" : partName)
.collect(Collectors.joining(","));
params.put("partName", partNames);
StringSubstitutor stringSubstitutor = new StringSubstitutor(params);
histogramSql = stringSubstitutor.replace(ANALYZE_HISTOGRAM_SQL_TEMPLATE_PART);
} finally {
tbl.readUnlock();
}
}
LOG.info("SQL to collect the histogram:\n {}", histogramSql);
try (AutoCloseConnectContext r = StatisticsUtil.buildConnectContext()) {
this.stmtExecutor = new StmtExecutor(r.connectContext, histogramSql);
this.stmtExecutor.execute();
}
Env.getCurrentEnv().getStatisticsCache().refreshSync(tbl.getId(), -1, col.getName());
}

Line under review: .isKeyword(partName) ? "`" + partName + "`" : partName)

Code after addressing the review:
public void execute() throws Exception {
Map<String, String> params = new HashMap<>();
params.put("internalDB", FeConstants.INTERNAL_DB_NAME);
params.put("histogramStatTbl", StatisticConstants.HISTOGRAM_TBL_NAME);
params.put("catalogId", String.valueOf(catalog.getId()));
params.put("dbId", String.valueOf(db.getId()));
params.put("tblId", String.valueOf(tbl.getId()));
params.put("idxId", "-1");
params.put("colId", String.valueOf(info.colName));
params.put("dbName", info.dbName);
params.put("tblName", String.valueOf(info.tblName));
params.put("colName", String.valueOf(info.colName));
params.put("sampleRate", String.valueOf(info.sampleRate));
params.put("maxBucketNum", String.valueOf(info.maxBucketNum));
params.put("percentValue", String.valueOf((int) (info.sampleRate * 100)));
String histogramSql;
Set<String> partitionNames = info.partitionNames;
if (partitionNames.isEmpty()) {
StringSubstitutor stringSubstitutor = new StringSubstitutor(params);
histogramSql = stringSubstitutor.replace(ANALYZE_HISTOGRAM_SQL_TEMPLATE_TABLE);
} else {
try {
tbl.readLock();
String partNames = partitionNames.stream()
.filter(x -> tbl.getPartition(x) != null)
.map(partName ->  "`" + partName + "`")
.collect(Collectors.joining(","));
params.put("partName", partNames);
StringSubstitutor stringSubstitutor = new StringSubstitutor(params);
histogramSql = stringSubstitutor.replace(ANALYZE_HISTOGRAM_SQL_TEMPLATE_PART);
} finally {
tbl.readUnlock();
}
}
LOG.info("SQL to collect the histogram:\n {}", histogramSql);
try (AutoCloseConnectContext r = StatisticsUtil.buildConnectContext()) {
this.stmtExecutor = new StmtExecutor(r.connectContext, histogramSql);
this.stmtExecutor.execute();
}
Env.getCurrentEnv().getStatisticsCache().refreshSync(tbl.getId(), -1, col.getName());
}