[improvement](storage) For debugging problem: add session variable (#14576)

This commit is contained in:
zhannngchen
2022-11-25 14:16:00 +08:00
committed by GitHub
parent d5d356b17f
commit 5efdcb9ed0
2 changed files with 16 additions and 3 deletions

View File

@ -1175,7 +1175,8 @@ public class OlapScanNode extends ScanNode {
}
private void filterDeletedRows(Analyzer analyzer) throws AnalysisException {
if (!Util.showHiddenColumns() && olapTable.hasDeleteSign()) {
if (!Util.showHiddenColumns() && olapTable.hasDeleteSign() && !ConnectContext.get().getSessionVariable()
.skipDeleteSign()) {
SlotRef deleteSignSlot = new SlotRef(desc.getAliasAsName(), Column.DELETE_SIGN);
deleteSignSlot.analyze(analyzer);
deleteSignSlot.getDesc().setIsMaterialized(true);

View File

@ -217,6 +217,8 @@ public class SessionVariable implements Serializable, Writable {
public static final String SKIP_DELETE_PREDICATE = "skip_delete_predicate";
public static final String SKIP_DELETE_SIGN = "skip_delete_sign";
public static final String ENABLE_NEW_SHUFFLE_HASH_METHOD = "enable_new_shuffle_hash_method";
public static final String ENABLE_PUSH_DOWN_NO_GROUP_AGG = "enable_push_down_no_group_agg";
@ -567,17 +569,23 @@ public class SessionVariable implements Serializable, Writable {
public boolean enableLocalExchange = true;
/**
* For debugg purpose, dont' merge unique key and agg key when reading data.
* For debug purpose, don't merge unique key and agg key when reading data.
*/
@VariableMgr.VarAttr(name = SKIP_STORAGE_ENGINE_MERGE)
public boolean skipStorageEngineMerge = false;
/**
* For debugg purpose, skip delte predicate when reading data.
* For debug purpose, skip delete predicate when reading data.
*/
@VariableMgr.VarAttr(name = SKIP_DELETE_PREDICATE)
public boolean skipDeletePredicate = false;
/**
* For debug purpose, skip delete sign when reading data.
*/
@VariableMgr.VarAttr(name = SKIP_DELETE_SIGN)
public boolean skipDeleteSign = false;
// This variable is used to avoid FE fallback to the original parser. When we execute SQL in regression tests
// for nereids, fallback will cause the Doris return the correct result although the syntax is unsupported
// in nereids for some mistaken modification. You should set it on the
@ -941,6 +949,10 @@ public class SessionVariable implements Serializable, Writable {
return skipStorageEngineMerge;
}
public boolean skipDeleteSign() {
return skipDeleteSign;
}
public boolean isAllowPartitionColumnNullable() {
return allowPartitionColumnNullable;
}