[chore](checkstyle): forbid lombok in Nereids (#27700)
This commit is contained in:
@ -41,7 +41,8 @@ import org.apache.doris.statistics.ColumnStatistic;
|
||||
import org.apache.doris.statistics.ColumnStatisticBuilder;
|
||||
import org.apache.doris.statistics.Histogram;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
@ -60,10 +61,11 @@ import java.util.Optional;
|
||||
/**
|
||||
* Util for minidump
|
||||
*/
|
||||
@Slf4j
|
||||
public class MinidumpUtils {
|
||||
|
||||
public static String DUMP_PATH = null;
|
||||
private static final Logger LOG = LogManager.getLogger(MinidumpUtils.class);
|
||||
|
||||
private static String DUMP_PATH = null;
|
||||
|
||||
/**
|
||||
* Saving of minidump file to fe log path
|
||||
@ -74,7 +76,7 @@ public class MinidumpUtils {
|
||||
try (FileWriter file = new FileWriter(dumpPath + ".json")) {
|
||||
file.write(jsonMinidump);
|
||||
} catch (IOException e) {
|
||||
log.info("failed to save minidump file", e);
|
||||
LOG.info("failed to save minidump file", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,7 +159,7 @@ public class MinidumpUtils {
|
||||
String inputString = sb.toString();
|
||||
return jsonMinidumpLoadFromString(inputString);
|
||||
} catch (IOException e) {
|
||||
log.info("failed to open minidump file", e);
|
||||
LOG.info("failed to open minidump file", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -29,7 +29,8 @@ import org.apache.doris.nereids.trees.plans.AbstractPlan;
|
||||
import org.apache.doris.nereids.trees.plans.Plan;
|
||||
import org.apache.doris.qe.ConnectContext;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
@ -42,8 +43,10 @@ import java.util.Optional;
|
||||
/**
|
||||
* log consumer
|
||||
*/
|
||||
@Slf4j
|
||||
public class NereidsTracer {
|
||||
|
||||
private static final Logger LOG = LogManager.getLogger(NereidsTracer.class);
|
||||
|
||||
private static long startTime;
|
||||
private static String TRACE_PATH = null;
|
||||
|
||||
@ -165,7 +168,7 @@ public class NereidsTracer {
|
||||
try (FileWriter file = new FileWriter(TRACE_PATH + "/" + queryId + ".json")) {
|
||||
file.write(totalTraces.toString(4));
|
||||
} catch (IOException e) {
|
||||
log.info("failed to output of tracer", e);
|
||||
LOG.info("failed to output of tracer", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -30,7 +30,8 @@ import org.apache.doris.statistics.ColumnStatisticBuilder;
|
||||
import org.apache.doris.statistics.Statistics;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* table: T(A, B)
|
||||
@ -56,9 +57,10 @@ import lombok.extern.slf4j.Slf4j;
|
||||
* for other expressions(except cast), we also need to adjust their input column stats.
|
||||
*
|
||||
*/
|
||||
@Slf4j
|
||||
public class ColumnStatsAdjustVisitor extends ExpressionVisitor<ColumnStatistic, Statistics> {
|
||||
|
||||
private static final Logger LOG = LogManager.getLogger(ColumnStatsAdjustVisitor.class);
|
||||
|
||||
@Override
|
||||
public ColumnStatistic visit(Expression expr, Statistics context) {
|
||||
expr.children().forEach(child -> child.accept(this, context));
|
||||
@ -91,7 +93,7 @@ public class ColumnStatsAdjustVisitor extends ExpressionVisitor<ColumnStatistic,
|
||||
context.addColumnStats(cast.child(), colStats);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.info("error", e);
|
||||
LOG.info("error", e);
|
||||
Preconditions.checkArgument(false, "type conversion failed");
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,7 +66,6 @@ import org.apache.doris.transaction.TransactionStatus;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@ -96,7 +95,6 @@ public class InsertIntoTableCommand extends Command implements ForwardWithSync,
|
||||
|
||||
private final LogicalPlan logicalQuery;
|
||||
|
||||
@Setter
|
||||
private Optional<String> labelName;
|
||||
private final boolean isOverwrite;
|
||||
private NereidsPlanner planner;
|
||||
@ -105,7 +103,6 @@ public class InsertIntoTableCommand extends Command implements ForwardWithSync,
|
||||
/**
|
||||
* When source it's from job scheduler,it will be set.
|
||||
*/
|
||||
@Setter
|
||||
private long jobId;
|
||||
|
||||
/**
|
||||
@ -119,6 +116,14 @@ public class InsertIntoTableCommand extends Command implements ForwardWithSync,
|
||||
this.isOverwrite = isOverwrite;
|
||||
}
|
||||
|
||||
public void setLabelName(Optional<String> labelName) {
|
||||
this.labelName = labelName;
|
||||
}
|
||||
|
||||
public void setJobId(long jobId) {
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
public NereidsPlanner getPlanner() {
|
||||
return planner;
|
||||
}
|
||||
|
||||
@ -32,7 +32,6 @@ import org.apache.doris.nereids.util.Utils;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Sets;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -46,11 +45,8 @@ import java.util.Set;
|
||||
public class LogicalFileScan extends LogicalCatalogRelation {
|
||||
|
||||
// TODO remove this conjuncts when old planner is removed
|
||||
@Getter
|
||||
private final Set<Expression> conjuncts;
|
||||
@Getter
|
||||
private final SelectedPartitions selectedPartitions;
|
||||
@Getter
|
||||
private final Optional<TableSample> tableSample;
|
||||
|
||||
/**
|
||||
@ -72,6 +68,18 @@ public class LogicalFileScan extends LogicalCatalogRelation {
|
||||
Sets.newHashSet(), SelectedPartitions.NOT_PRUNED, tableSample);
|
||||
}
|
||||
|
||||
public Set<Expression> getConjuncts() {
|
||||
return conjuncts;
|
||||
}
|
||||
|
||||
public SelectedPartitions getSelectedPartitions() {
|
||||
return selectedPartitions;
|
||||
}
|
||||
|
||||
public Optional<TableSample> getTableSample() {
|
||||
return tableSample;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExternalTable getTable() {
|
||||
Preconditions.checkArgument(table instanceof ExternalTable,
|
||||
|
||||
@ -32,8 +32,6 @@ import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
|
||||
import org.apache.doris.nereids.util.Utils;
|
||||
import org.apache.doris.statistics.Statistics;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
@ -44,11 +42,8 @@ import java.util.Set;
|
||||
public class PhysicalFileScan extends PhysicalCatalogRelation {
|
||||
|
||||
private final DistributionSpec distributionSpec;
|
||||
@Getter
|
||||
private final Set<Expression> conjuncts;
|
||||
@Getter
|
||||
private final SelectedPartitions selectedPartitions;
|
||||
@Getter
|
||||
private final Optional<TableSample> tableSample;
|
||||
|
||||
/**
|
||||
@ -81,6 +76,22 @@ public class PhysicalFileScan extends PhysicalCatalogRelation {
|
||||
this.tableSample = tableSample;
|
||||
}
|
||||
|
||||
public DistributionSpec getDistributionSpec() {
|
||||
return distributionSpec;
|
||||
}
|
||||
|
||||
public Set<Expression> getConjuncts() {
|
||||
return conjuncts;
|
||||
}
|
||||
|
||||
public SelectedPartitions getSelectedPartitions() {
|
||||
return selectedPartitions;
|
||||
}
|
||||
|
||||
public Optional<TableSample> getTableSample() {
|
||||
return tableSample;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Utils.toSqlString("PhysicalFileScan",
|
||||
|
||||
Reference in New Issue
Block a user