-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
area: data-opsData transformation and analysisData transformation and analysisenhancementNew feature or requestNew feature or requestpriority: mediumValuable but not urgentValuable but not urgent
Milestone
Description
Summary
Extend ex-mode (:) with expression support for complex filters and computed columns, enabling queries like latency > 500 && status != 200.
Problem
Current filtering is regex-based on a single column at a time. There's no way to express compound conditions (e.g. "show rows where latency > 500 AND status is not 200") or create computed columns (e.g. "response_time / 1000").
Features
- Expression-based filtering:
:filter latency > 500 && status != 200 - Computed columns:
:add-column duration_s = latency / 1000 - Support basic arithmetic, comparison, and logical operators
- String functions (contains, startswith, len, upper/lower)
- Access columns by name in expressions
Technical Considerations
- Keep the expression language simple — this is not SQL or Python, it's a lightweight DSL
- Could use Python's
ast.literal_evalor a simple expression parser - Should integrate with the existing ex-mode command system
- Alternatively, consider a subset of Python expressions (like VisiData) or SQL WHERE clauses (like lnav)
Related
- Inspired by lnav's SQLite queries and VisiData's Python expressions
- Complements existing regex-based filtering (
f,F,e,E)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: data-opsData transformation and analysisData transformation and analysisenhancementNew feature or requestNew feature or requestpriority: mediumValuable but not urgentValuable but not urgent