Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5016

Config param drill.exec.sort.purge.threshold is misnamed

    XMLWordPrintableJSON

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);
          }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            paul-rogers Paul Rogers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: