Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

values helper should accept one or more hash maps #442

Open
seancorfield opened this issue Nov 17, 2022 · 1 comment
Open

values helper should accept one or more hash maps #442

seancorfield opened this issue Nov 17, 2022 · 1 comment
Assignees
Labels
enhancement needs analysis I need to think about this!

Comments

@seancorfield
Copy link
Owner

Currently, values expects a sequence of either hash maps or sequences (column values) and returns {:values <arg>}.

Based on how many other helpers work, intuition would expect (values map1 map2 map3) to return {:values [map1 map2 map3]}.

Enhance it to support this and update the docs and examples around it.

@seancorfield seancorfield self-assigned this Nov 17, 2022
@seancorfield seancorfield added the needs analysis I need to think about this! label Nov 18, 2022
@seancorfield
Copy link
Owner Author

It turns out this is harder than it looks.

The values helper is (currently) a generic-1 so it always treats it as a single argument. We can change that easily but...

...while we can clearly treat multiple arguments as a sequence of rows, the single argument case is tricky. A single argument with all hash maps could still be a row where all columns are JSON, and similarly for a single argument with all sequences (vectors). A single argument with mixed data pretty much has to be a row but we can't tell in those other cases and we don't want to break backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement needs analysis I need to think about this!
Projects
None yet
Development

No branches or pull requests

1 participant