lidavidm commented on a change in pull request #11466: URL: https://github.com/apache/arrow/pull/11466#discussion_r741081106
########## File path: cpp/src/arrow/compute/exec/expression.cc ########## @@ -394,14 +394,13 @@ Result<Expression> BindImpl(Expression expr, const TypeOrSchema& in, if (expr.literal()) return expr; if (auto ref = expr.field_ref()) { - if (ref->IsNested()) { - return Status::NotImplemented("nested field references"); - } - ARROW_ASSIGN_OR_RAISE(auto path, ref->FindOne(in)); auto bound = *expr.parameter(); - bound.index = path[0]; + bound.indices.resize(path.indices().size()); + for (size_t i = 0; i < path.indices().size(); ++i) { + bound.indices[i] = path.indices()[i]; + } Review comment: ``` /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:378:46: error: no type named 'value_type' in 'std::iterator_traits<arrow::internal::StaticVectorImpl<int, 2, arrow::internal::SmallVectorStorage<int, 2> > >' typedef typename iterator_traits<_OI>::value_type _ValueTypeO; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:422:23: note: in instantiation of function template specialization 'std::__copy_move_a<false, const int *, arrow::internal::StaticVectorImpl<int, 2, arrow::internal::SmallVectorStorage<int, 2> > >' requested here return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), ^ /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:454:20: note: in instantiation of function template specialization 'std::__copy_move_a2<false, __gnu_cxx::__normal_iterator<const int *, std::vector<int, std::allocator<int> > >, arrow::internal::StaticVectorImpl<int, 2, arrow::internal::SmallVectorStorage<int, 2> > >' requested here return (std::__copy_move_a2<__is_move_iterator<_II>::__value> ^ /home/lidavidm/Code/upstream/arrow-13987/cpp/src/arrow/compute/exec/expression.cc:401:10: note: in instantiation of function template specialization 'std::copy<__gnu_cxx::__normal_iterator<const int *, std::vector<int, std::allocator<int> > >, arrow::internal::StaticVectorImpl<int, 2, arrow::internal::SmallVectorStorage<int, 2> > >' requested here std::copy(path.indices().begin(), path.indices().end(), bound.indices); ^ /home/lidavidm/Code/upstream/arrow-13987/cpp/src/arrow/compute/exec/expression.cc:424:10: note: in instantiation of function template specialization 'arrow::compute::(anonymous namespace)::BindImpl<arrow::DataType>' requested here return BindImpl(*this, *in.type, in.shape, exec_context); ^ ``` -- 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