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

feat(sql): Adds FROM source check for string paths #3679

Merged

Conversation

rchowell
Copy link
Contributor

@rchowell rchowell commented Jan 14, 2025

This PR introduces a check on the FROM source to error when using string literal syntax (single-quoted identifiers). This PR will no longer be a draft once table path strings are added (see skipped tests).

closes #3197

@rchowell rchowell force-pushed the rchowell/df-254-sql-support-for-path-as-from-source branch from de4f76b to 5c3fa87 Compare January 14, 2025 01:31
@rchowell rchowell changed the title [DRAFT] Adds FROM source check for string paths [FEAT] Adds FROM source check for string paths Jan 14, 2025
@rchowell rchowell changed the title [FEAT] Adds FROM source check for string paths feat(sql) Adds FROM source check for string paths Jan 14, 2025
Copy link

codspeed-hq bot commented Jan 14, 2025

CodSpeed Performance Report

Merging #3679 will improve performances by 12.43%

Comparing rchowell/df-254-sql-support-for-path-as-from-source (87aceda) with main (0e03303)

Summary

⚡ 1 improvements
✅ 26 untouched benchmarks

Benchmarks breakdown

Benchmark main rchowell/df-254-sql-support-for-path-as-from-source Change
test_count[1 Small File] 3.9 ms 3.5 ms +12.43%

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 96.61017% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.42%. Comparing base (c932ec9) to head (87aceda).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/daft-sql/src/planner.rs 96.61% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3679      +/-   ##
==========================================
- Coverage   78.06%   76.42%   -1.64%     
==========================================
  Files         728      726       -2     
  Lines       89967    92397    +2430     
==========================================
+ Hits        70236    70618     +382     
- Misses      19731    21779    +2048     
Files with missing lines Coverage Δ
src/daft-sql/src/planner.rs 74.49% <96.61%> (+0.60%) ⬆️

... and 40 files with indirect coverage changes

@rchowell rchowell changed the title feat(sql) Adds FROM source check for string paths feat(sql): Adds FROM source check for string paths Jan 14, 2025
@github-actions github-actions bot added the feat label Jan 14, 2025
@rchowell rchowell marked this pull request as ready for review January 14, 2025 20:08
Comment on lines +1063 to +1064
let path = name.to_string();
let path = &path[1..path.len() - 1]; // strip single-quotes ' '
Copy link
Contributor

Choose a reason for hiding this comment

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

tip: you can also get the unquoted value via object_name.0[0].value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed in: #3683

Copy link
Contributor

@universalmind303 universalmind303 left a comment

Choose a reason for hiding this comment

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

Looks good. thanks @rchowell

@universalmind303 universalmind303 merged commit a2e1c71 into main Jan 14, 2025
43 of 44 checks passed
@universalmind303 universalmind303 deleted the rchowell/df-254-sql-support-for-path-as-from-source branch January 14, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL support for PATH as FROM source
2 participants