Skip to content

feat: add unary expressions#175

Merged
raphasampaio merged 13 commits into
masterfrom
rs/adjust3
May 17, 2026
Merged

feat: add unary expressions#175
raphasampaio merged 13 commits into
masterfrom
rs/adjust3

Conversation

@raphasampaio
Copy link
Copy Markdown
Member

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

raphasampaio and others added 11 commits May 11, 2026 21:48
Replace the 1013-line expression_node.cpp with one .cpp per node class
(ExpressionFile, Scalar, Binary, Unary, Ternary, Aggregate, AggregateAgents,
SelectAgents, RenameAgents) plus a shared expression_helpers.h holding the
broadcast/validation/aggregation helpers previously in an anonymous namespace.

Mechanical refactor: no behavior change, all 7 test suites pass unchanged.

Also fix a pre-existing C2375 linkage mismatch by adding QUIVER_API to friend
declarations in expression.h. The friends were declared without the DLL
attribute while the matching free function decls had QUIVER_API; MSVC
/permissive- rejects this. The mismatch was introduced when friend decls
replaced the public node() accessor, and was masked until now by stale
incremental build state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace string operation names with typed enums across C++, C API, and
Julia binding for Expression::aggregate and aggregate_agents:

C++:
- Expression::aggregate signature: (string, string, optional<double>)
  -> (string, ExpressionAggregate::Operation, optional<double>)
- Expression::aggregate_agents signature: (string, optional<double>)
  -> (ExpressionAggregateAgents::Operation, optional<double>)
- Delete the static parse_operation methods on both aggregate classes
- Delete unused parse_aggregation_operation_name template from
  expression_helpers.h

C API:
- Add quiver_expression_aggregate_operation_t and
  quiver_expression_aggregate_agents_operation_t (5 values each:
  SUM/MEAN/MIN/MAX/PERCENTILE)
- Switch quiver_expression_aggregate and _aggregate_agents to take the
  new enum types
- Add from_c() converters mirroring the existing dispatch() pattern

Julia binding:
- Tests reference Quiver.C.QUIVER_EXPRESSION_AGGREGATE_OPERATION_* directly
- Regenerate c_api.jl via generator.bat

Tests:
- Update 20 C++ + 16 C + 22 Julia callsites
- Delete three negative tests now compile-time-safe (unknown-op string
  and null-op pointer)

Output labels in ExpressionAggregateAgents (e.g., "sum", "mean") remain
strings derived via aggregation_operation_label<Op>() — that template is
still consumed and kept.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@raphasampaio raphasampaio marked this pull request as ready for review May 17, 2026 23:15
@raphasampaio raphasampaio merged commit 294a516 into master May 17, 2026
24 checks passed
@raphasampaio raphasampaio deleted the rs/adjust3 branch May 17, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant