nealrichardson commented on code in PR #19706: URL: https://github.com/apache/arrow/pull/19706#discussion_r1073774481
########## r/src/expression.cpp: ########## @@ -46,13 +46,26 @@ std::shared_ptr<compute::Expression> compute___expr__call(std::string func_name, compute::call(std::move(func_name), std::move(arguments), std::move(options_ptr))); } +// [[arrow::export]] +bool compute___expr__is_field_ref(const std::shared_ptr<compute::Expression>& x) { + return x->field_ref() != nullptr; +} + // [[arrow::export]] std::vector<std::string> field_names_in_expression( const std::shared_ptr<compute::Expression>& x) { std::vector<std::string> out; + std::vector<arrow::FieldRef> nested; + auto field_refs = FieldsInExpression(*x); for (auto f : field_refs) { - out.push_back(*f.name()); + if (f.IsNested()) { + // We keep the top-level field name. Review Comment: Thanks for the pointers. I've deferred cleaning this up to #33760 since I see a few places where it could be more involved than just deleting code. -- 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...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org