Skip to content

[WIP] feat(ffi): add literal expression support#7675

Draft
m7kss1 wants to merge 2 commits intovortex-data:developfrom
m7kss1:ffi/literal-expressions
Draft

[WIP] feat(ffi): add literal expression support#7675
m7kss1 wants to merge 2 commits intovortex-data:developfrom
m7kss1:ffi/literal-expressions

Conversation

@m7kss1
Copy link
Copy Markdown
Contributor

@m7kss1 m7kss1 commented Apr 27, 2026

Summary

TBD

API Changes

TBD

Testing

Verifying new behavior and functionality works correctly.

@m7kss1 m7kss1 force-pushed the ffi/literal-expressions branch from be85135 to a40cc2c Compare April 27, 2026 16:38
@m7kss1 m7kss1 changed the title feat(ffi): add literal expression support [WIP] feat(ffi): add literal expression support Apr 27, 2026
@m7kss1 m7kss1 marked this pull request as draft April 27, 2026 18:04
@m7kss1
Copy link
Copy Markdown
Contributor Author

m7kss1 commented Apr 27, 2026

note: the current design is not ideal and will be changed. the ffi usage is expected to resemble something like this:

vx_scalar *scalar = ...; // opaque class
vx_expression *expr = vx_expression_literal(scalar);

@myrrc myrrc self-requested a review April 28, 2026 08:58
Comment thread vortex-ffi/cinclude/vortex.h Outdated
* The input string is borrowed and copied into the returned expression.
* If `value` is NULL, returns NULL.
*/
vx_expression *vx_expression_literal_utf8(const vx_string *value, bool is_nullable);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. I believe we want a dedicated vx_scalar type and not just expressions, as scalar are useful for other purposes.

Comment thread vortex-ffi/src/expression.rs Outdated
///
/// `value` must point to one value of the C type corresponding to `ptype`.
/// For `PTYPE_F16`, the value is represented as `uint16_t`.
/// If `value` is NULL, returns NULL.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an API usage example. You may reference primitive array creation in src/array.rs

@m7kss1 m7kss1 force-pushed the ffi/literal-expressions branch 3 times, most recently from acd49c9 to c1cae72 Compare April 28, 2026 22:09
m7kss1 added 2 commits April 29, 2026 01:18
Signed-off-by: Dergousov Maksim <dergousovmaxim99@gmail.com>
Signed-off-by: Dergousov Maksim <dergousovmaxim99@gmail.com>
@m7kss1 m7kss1 force-pushed the ffi/literal-expressions branch from c1cae72 to 66bdcfd Compare April 28, 2026 22:18
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.

2 participants