-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Description
Feature Request: Marking mode for chain operations
Background
While fixing PR #751, discovered ASTRef was marking instead of filtering. Fixed to filter (correct for data flow), but marking has value.
Proposed Contexts for Marking Mode
1. Chain Operations with Matchers
# Mark matching nodes in chain
Chain([n({'type': 'person'}).mark()]) # Returns all nodes with 'is_person' column
2. Within Let() Bindings
# Order-sensitive marking in DAG context
let({
'marked_people': n({'type': 'person'}).mark(), # Marks but doesn't filter
'marked_companies': n({'type': 'company'}).mark(), # Can see previous marks
'high_value': n({'value': {'': 1000}}).mark() # Accumulates marks
})
# Result: Full graph with multiple boolean columns
3. Match Context (Future)
# Pattern matching with marking
match(pattern).mark() # Marks matched subgraphs
Key Design Questions
- Chain context: Should .mark() be on matchers (n/e) or Chain?
- Let context: How to handle order-sensitive accumulation?
- API: .mark() method vs mode parameter?
- Column naming: Auto-generate or user-specified?
Implementation Notes
- Marking logic exists (removed in cdaccd9)
- Need conditional marking vs filtering
- Consider performance implications
Metadata
Metadata
Assignees
Labels
No labels