Skip to content

Add support for ORDER BY on unprojected columns - #1415

Merged
alamb merged 7 commits into
apache:masterfrom
viirya:issue_1372
Dec 9, 2021
Merged

alamb merged 7 commits into
apache:masterfrom
viirya:issue_1372

Conversation

@viirya

@viirya viirya commented Dec 7, 2021

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #1372.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@xudong963

Copy link
Copy Markdown
Member

It'll be better to also add a test in datafusion/tests/sql.rs.

@xudong963 xudong963 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I gave some of my suggestions. Thanks for your contribution, @viirya!

Comment thread datafusion/src/logical_plan/builder.rs Resolved
Comment thread datafusion/src/logical_plan/builder.rs Resolved
Comment thread datafusion/src/logical_plan/builder.rs Resolved
Comment thread datafusion/src/logical_plan/builder.rs Resolved
Comment thread datafusion/src/logical_plan/builder.rs Resolved
@viirya

viirya commented Dec 8, 2021

Copy link
Copy Markdown
Member Author

Thanks @xudong963

Comment thread datafusion/src/logical_plan/builder.rs Resolved
Comment thread datafusion/src/logical_plan/builder.rs Resolved
@houqp

houqp commented Dec 8, 2021

Copy link
Copy Markdown
Member

Thank you @viirya , very cool to see this in action.

@viirya

viirya commented Dec 8, 2021

Copy link
Copy Markdown
Member Author

@houqp thanks for review. Fixed.

@houqp houqp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@houqp houqp added the bug Something isn't working label Dec 8, 2021

@xudong963 xudong963 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice work!

Ok(())
})?;

if missing_cols.is_empty() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@alamb

alamb commented Dec 9, 2021

Copy link
Copy Markdown
Contributor

Thanks @viirya !

@alamb
alamb merged commit 591932f into apache:master Dec 9, 2021
@Dandandan

Copy link
Copy Markdown
Contributor

Nice 🎉

Comment thread datafusion/tests/sql.rs
let mut ctx = ExecutionContext::new();
register_alltypes_parquet(&mut ctx).await;
// execute the query
let sql = "SELECT id FROM alltypes_plain ORDER BY int_col, double_col";

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.

👍

@viirya

viirya commented Dec 9, 2021

Copy link
Copy Markdown
Member Author

Thank you @houqp @xudong963 @alamb @Dandandan !

@alamb alamb mentioned this pull request Dec 9, 2021
@alamb alamb changed the title Support sort on unprojected columns Add support for ORDER BY on unprojected columns Feb 10, 2022
@alamb alamb added enhancement New feature or request and removed bug Something isn't working labels Feb 10, 2022
unkloud pushed a commit to unkloud/datafusion that referenced this pull request Mar 23, 2025
…ceberg_compat readers (apache#1415)

major changes :
- allow Uint64 to decimal and  FixedWidthBinary to Binary conversions in complex readers
- do not enable prefetch reads in tests if complex reader is enabled
- fix more incompatible checks in uint_8/uint_16 tests
- skip datetime rebase tests for complex readers (not supported)

There may be conflicts between this and apache#1413  (@mbutrovich) which removes the `cast_supported` method but can be reconciled afterwards

Without apache#1413 the failure counts are: 
```
native_datafusion: Tests: succeeded 658, failed 19, canceled 4, ignored 54, pending 0
native_iceberg_compat: Tests: succeeded 662, failed 15, canceled 4, ignored 54, pending 0
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Sort on unprojected columns

5 participants