Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.8.0
-
None
-
None
-
None
Description
The Drill config system provides a property called drill.exec.sort.purge.threshold. The name suggests that this is a parameter related to sorting. Perhaps it controls something having to do with when we purge buffered batches from memory in the ExternalSortBatch?
In fact, this is actually drill.exec.topn.purge-threshold - it affects only the Top-N operator, not sort.
To make this change, rename the config attribute in ExecConstants from
String BATCH_PURGE_THRESHOLD = "drill.exec.sort.purge.threshold";
to:
String TOP_N_PURGE_THRESHOLD = "drill.exec.topn.purge-threshold";
To permit backward compatibility, modify the use in TopNBatch to check the old value, use it if set, else use the new value.
// Check pre x.y config parameter for backward compatibility. if ( ! context.getConfig( ).isEmpty( "drill.exec.sort.purge.threshold" ) ) { batchPurgeThreshold = context.getConfig().getInt("drill.exec.sort.purge.threshold"); } else { batchPurgeThreshold = context.getConfig().getInt(ExecConstants. TOP_N_PURGE_THRESHOLD); }