[SERVER-83441] Pushdown top-level fields from FilterNode into PhysicalScanNode Created: 20/Nov/23  Updated: 11/Jan/24  Resolved: 21/Dec/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Anton Korshunov Assignee: Timour Katchaounov
Resolution: Fixed Votes: 0
Labels: M7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-83442 Reorder predicates in a Filter node b... Backlog
is depended on by SERVER-83456 Skip Filter->Sargable rewrite for col... Closed
Problem/Incident
Related
related to SERVER-84366 Incorrect selectivity in explain for ... Backlog
Backwards Compatibility: Fully Compatible
Sprint: QO 2023-11-27, QO 2023-12-11, QO 2023-12-25
Participants:
Linked BF Score: 35

 Description   

Currently this optimization is supported on a Sargable node. In order to be able to skip the Filter->Sargable rewrite we should be able to push-down top-level fields directly from a Filter node into a Scan node. 



 Comments   
Comment by Githook User [ 20/Dec/23 ]

Author:

{'name': 'Timour Katchaounov', 'email': '34627040+timourk@users.noreply.github.com', 'username': 'timourk'}

Message: SERVER-83441 Implement top-level fields pushdown from Filter into CollScan (#17683)

SERVER-83441 Implement top-level fields pushdown from Filter into
CollScan

Push top-level PathGet as a PhysicalScan projection.

Implemented via path analysis inside the implementor transport for
FilterNode. If there any fields to be pushed down, the transport creates
both a PhysicalScan node with the pushed fields, and FilterNode with
modified paths, where each top-level PathGet is removed.

The transformation is performed only for FilterNodes that are directly
on top of a ScanNode. In order to be efficient, this transformation
assumes that the FilterNode contains all the paths and path conditions,
that is, top-level conjunctions have not been split into a sequence of
FilterNode.

GitOrigin-RevId: 32cba0c99ac4d8e758068be6a724c0a6bc2d1ab0
Branch: master
https://github.com/mongodb/mongo/commit/29a5df3095b5aeaff0eb3abd41cd94f90f856d6e

Generated at Thu Feb 08 06:52:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.