diff --git a/contrib/storage-splunk/src/main/java/org/apache/drill/exec/store/splunk/SplunkGroupScan.java b/contrib/storage-splunk/src/main/java/org/apache/drill/exec/store/splunk/SplunkGroupScan.java index cb8de9a0c98..53596a2b549 100644 --- a/contrib/storage-splunk/src/main/java/org/apache/drill/exec/store/splunk/SplunkGroupScan.java +++ b/contrib/storage-splunk/src/main/java/org/apache/drill/exec/store/splunk/SplunkGroupScan.java @@ -321,16 +321,10 @@ private String generateQuery() { // default time boundaries in the config. These will be overwritten in filter pushdowns if (filters != null && filters.containsKey(SplunkUtils.EARLIEST_TIME_COLUMN)) { earliestTime = filters.get(SplunkUtils.EARLIEST_TIME_COLUMN).value.value.toString(); - - // Remove from map - filters.remove(SplunkUtils.EARLIEST_TIME_COLUMN); } if (filters != null && filters.containsKey(SplunkUtils.LATEST_TIME_COLUMN)) { latestTime = filters.get(SplunkUtils.LATEST_TIME_COLUMN).value.value.toString(); - - // Remove from map so they are not pushed down into the query - filters.remove(SplunkUtils.LATEST_TIME_COLUMN); } if (earliestTime == null) { @@ -355,7 +349,6 @@ private String generateQuery() { if (filters != null && filters.containsKey("sourcetype")) { String sourcetype = filters.get("sourcetype").value.value.toString(); builder.addSourceType(sourcetype); - filters.remove("sourcetype"); } // Add projected columns, skipping star and specials. diff --git a/contrib/storage-splunk/src/main/java/org/apache/drill/exec/store/splunk/SplunkPluginConfig.java b/contrib/storage-splunk/src/main/java/org/apache/drill/exec/store/splunk/SplunkPluginConfig.java index 7c5f5b29676..15f8b0d5792 100644 --- a/contrib/storage-splunk/src/main/java/org/apache/drill/exec/store/splunk/SplunkPluginConfig.java +++ b/contrib/storage-splunk/src/main/java/org/apache/drill/exec/store/splunk/SplunkPluginConfig.java @@ -327,9 +327,9 @@ public String toString() { .field("earliestTime", earliestTime) .field("latestTime", latestTime) .field("Authentication Mode", authMode) - .field("maxColumns", maxColumns) - .field("maxCacheSize", maxCacheSize) - .field("cacheExpiration", cacheExpiration) + .field("maxColumns", maxColumns) + .field("maxCacheSize", maxCacheSize) + .field("cacheExpiration", cacheExpiration) .toString(); } diff --git a/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkLimitPushDownTest.java b/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkLimitPushDownTest.java index 813c665239d..f5200b98c8b 100644 --- a/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkLimitPushDownTest.java +++ b/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkLimitPushDownTest.java @@ -64,6 +64,7 @@ public void testLimitWithFilter() throws Exception { .sql(sql) .planMatcher() .include("Limit", "maxRecords=4") + .include("spl", "search index=_audit rating=52.17 | fields rating | head 5 | table rating") .match(); } }