Conversation
map_values, map_keys
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1788 +/- ##
============================================
+ Coverage 56.12% 59.46% +3.34%
- Complexity 976 1140 +164
============================================
Files 119 128 +9
Lines 11743 12531 +788
Branches 2251 2356 +105
============================================
+ Hits 6591 7452 +861
+ Misses 4012 3889 -123
- Partials 1140 1190 +50 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
parthchandra
left a comment
There was a problem hiding this comment.
lgtm. (Some minor comments)
native/core/src/execution/planner.rs
Outdated
| let session_ctx = SessionContext::new(); | ||
|
|
||
| // generate test data in the temp folder | ||
| let test_data = "select map([named_struct('a', 1, 'b', 'n', 'c', 'x')], [named_struct('a', 1, 'b', 'n', 'c', 'x')]) c0"; |
There was a problem hiding this comment.
minor: can we use a different struct for the key and the value, just to make it clear we are reading the correct fields.
| sqlConf: Seq[(String, String)] = Seq.empty, | ||
| debugCometDF: DataFrame => Unit = _ => ()): Unit = { | ||
| debugCometDF: DataFrame => Unit = _ => (), | ||
| checkCometOperator: Boolean = true): Unit = { |
There was a problem hiding this comment.
does not related directly, but this extends testing method functionality little bit to support tests which doesn't require all native comet operators. Used this extension to find that map_keys projection is not supported
native/core/src/execution/planner.rs
Outdated
| select map(named_struct('a', 1, 'b', 'n', 'c', 'x'), named_struct('a', 1, 'b', 'n', 'c', 'x')) m | ||
| */ | ||
| #[tokio::test] | ||
| async fn test_nested_types_map_keys_by_index() -> Result<(), DataFusionError> { |
There was a problem hiding this comment.
nit: what does the by_index part of the name refer to?
| "select map_keys(c0).b from tbl") | ||
| } | ||
|
|
||
| // test("native reader - select nested field from a complex map key using map_values") { |
There was a problem hiding this comment.
Should this test be ignored with a link to an issue rather than commented out?
|
Thanks everyone |
* fix: support `map_keys`
Which issue does this PR close?
Closes #1781.
Rationale for this change
What changes are included in this PR?
How are these changes tested?