[
https://issues.apache.org/jira/browse/DRILL-8283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17627699#comment-17627699
]
ASF GitHub Bot commented on DRILL-8283:
---------------------------------------
jnturton commented on code in PR #2699:
URL: https://github.com/apache/drill/pull/2699#discussion_r1011758384
##########
contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/TestMongoProjectPushDown.java:
##########
@@ -93,14 +93,27 @@ public void testMultipleColumnsProject() throws Exception {
@Test
public void testStarProject() throws Exception {
- String query = String.format(TEST_QUERY_PROJECT_PUSH_DOWN__TEMPLATE_3,
EMPLOYEE_DB, EMPINFO_COLLECTION);
+ String query = String.format(TEST_QUERY_PROJECT_PUSH_DOWN_TEMPLATE_3,
EMPLOYEE_DB, EMPINFO_COLLECTION);
testBuilder()
.sqlQuery(query)
.unOrdered()
.expectsNumRecords(19)
.go();
}
+ // DRILL-8238
+ @Test
+ public void testOperatorsProject() throws Exception {
+ String query = String.format(TEST_QUERY_PROJECT_PUSH_DOWN_TEMPLATE_4,
EMPLOYEE_DB, EMPINFO_COLLECTION);
+
+ testBuilder()
+ .sqlQuery(query)
+ .unOrdered()
+ .baselineColumns("position_id_or_default")
+ .expectsNumRecords(19)
Review Comment:
I guess it should be possible to explicitly test whether the coalescing
operator was applied successfully, not just whether the query now completes
without an error.
> Add a configurable recursive file listing size limit
> ----------------------------------------------------
>
> Key: DRILL-8283
> URL: https://issues.apache.org/jira/browse/DRILL-8283
> Project: Apache Drill
> Issue Type: Improvement
> Components: Storage - Other
> Affects Versions: 1.20.2
> Reporter: James Turton
> Assignee: James Turton
> Priority: Minor
> Fix For: 1.20.3
>
>
> Currently a malicious or merely unwitting user can crash their Drill foreman
> by sending
> {code:java}
> select * from dfs.huge_workspace limit 10
> {code}
> causing the query planner to recurse over every file in huge_workspace and
> culminating in
> {code:java}
> 2022-08-09 15:13:22,251 [1d0da29f-e50c-fd51-43d9-8a5086d52c4e:foreman] ERROR
> o.a.drill.common.CatastrophicFailure - Catastrophic Failure Occurred,
> exiting. Information message: Unable to handle out of memory condition in
> Foreman.java.lang.OutOfMemoryError: null {code}
> if there are enough files in huge_workspace. A SHOW FILES command can produce
> the same effect. This issue proposes a new BOOT option named
> drill.exec.storage.file.recursive_listing_max_size with a default value of,
> say 10 000. If a file listing task exceeds this limit then the initiating
> operation is terminated with a UserException preventing runaway resource
> usage.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)