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

[WIP] fix(isthmus): fix rel converter for sort when slot is wrapped #235

Closed
wants to merge 2 commits into from

Conversation

bvolpato
Copy link
Member

Attempt to fix #192

It works for cases in which RexSlot is wrapped (as we visit + recurse over all the expressions), but it doesn't work yet for literals. Unclear what we should do, I'll do some more digging.

@vbarua
Copy link
Member

vbarua commented Feb 27, 2024

The RelCollation class, which is used to capture the ordering in Calcite Sort relations, only appears to support column inputs (and not arbitrary expressions).

This is actually fairly similar to the issue of complex expressions in Aggregate group keys. Calcite only allows field references to be used as grouping keys, but Substrait is more permissive. The approach that was taken for that was to add a Project before the Aggregate to execute the expressions and provide field references for use in the Aggregate. That could potentially work here.

See #214

@bvolpato bvolpato closed this Aug 15, 2024
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.

[ISTHMUS] ClassCastException when converting ORDER BY clause which isn't a column reference
2 participants