alamb commented on code in PR #12614: URL: https://github.com/apache/datafusion/pull/12614#discussion_r1777712094
########## datafusion/sql/src/expr/identifier.rs: ########## @@ -142,9 +135,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { } } } - not_impl_err!( - "Compound identifiers not supported by ExprPlanner: {ids:?}" - ) + exec_err!("could not parse compound identifier from {ids:?}") Review Comment: I think perhaps this should this `plan_err!` rather than `exec_err!` as it happens during planning? ########## datafusion/sqllogictest/test_files/struct.slt: ########## @@ -282,3 +282,94 @@ drop table values; statement ok drop table struct_values; + +statement ok +CREATE OR REPLACE VIEW complex_view AS +SELECT { + 'user': { + 'info': { + 'personal': { + 'name': 'John Doe', + 'age': 30, + 'email': 'john....@example.com' + }, + 'address': { + 'street': '123 Main St', + 'city': 'Anytown', + 'country': 'Countryland', + 'coordinates': [40.7128, -74.0060] + } + }, + 'preferences': { + 'theme': 'dark', + 'notifications': true, + 'languages': ['en', 'es', 'fr'] + }, + 'stats': { + 'logins': 42, + 'last_active': '2023-09-15', + 'scores': [85, 92, 78, 95], + 'achievements': { + 'badges': ['early_bird', 'top_contributor'], + 'levels': { + 'beginner': true, + 'intermediate': true, + 'advanced': false + } + } + } + }, + 'metadata': { + 'version': '1.0', + 'created_at': '2023-09-01T12:00:00Z' + }, + 'deep_nested': { + 'level1': { + 'level2': { + 'level3': { + 'level4': { + 'level5': { + 'level6': { + 'level7': { + 'level8': { + 'level9': { + 'level10': 'You reached the bottom!' + } + } + } + } + } + } + } + } + } + } +} AS complex_data; + +query T +SELECT complex_data.user.info.personal.name FROM complex_view; Review Comment: 😍 ########## datafusion/sql/src/expr/identifier.rs: ########## @@ -170,7 +161,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { not_impl_err!( "Nested identifiers are not yet supported for OuterReferenceColumn {}", Column::from((qualifier, field)).quoted_flat_name() - ) + ) Review Comment: it is strange that `cargo fmt` doesn't flag this change as a problem -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org