Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check window function signature exists (#7188)
Summary: Check window function signature exists before creating window function and produce clear error message if signature doesn't exist. Avoid failures with no context like this one: ``` VeloxRuntimeError: at Unknown.# 0 facebook::velox::VeloxException::VeloxException(char const*, unsigned long, char const*, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, bool, facebook::velox::VeloxException::Type, std::basic_string_view<char, std::char_traits<char> >)(Unknown Source) at Unknown.# 1 void facebook::velox::detail::veloxCheckFail<facebook::velox::VeloxRuntimeError, facebook::velox::detail::CompileTimeEmptyString>(facebook::velox::detail::VeloxCheckFailArgs const&, facebook::velox::detail::CompileTimeEmptyString)(Unknown Source) at Unknown.# 2 std::_Function_handler<std::unique_ptr<facebook::velox::exec::Aggregate, std::default_delete<facebook::velox::exec::Aggregate> > (facebook::velox::core::AggregationNode::Step, std::vector<std::shared_ptr<facebook::velox::Type const>, std::allocator<std::shared_ptr<facebook::velox::Type const> > > const&, std::shared_ptr<facebook::velox::Type const> const&, facebook::velox::core::QueryConfig const&), facebook::velox::aggregate::prestosql::(anonymous namespace)::registerMapUnionSum(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::$_0>::_M_invoke(std::_Any_data const&, facebook::velox::core::AggregationNode::Step&&, std::vector<std::shared_ptr<facebook::velox::Type const>, std::allocator<std::shared_ptr<facebook::velox::Type const> > > const&, std::shared_ptr<facebook::velox::Type const> const&, facebook::velox::core::QueryConfig const&)(Unknown Source) at Unknown.# 3 facebook::velox::exec::Aggregate::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, facebook::velox::core::AggregationNode::Step, std::vector<std::shared_ptr<facebook::velox::Type const>, std::allocator<std::shared_ptr<facebook::velox::Type const> > > const&, std::shared_ptr<facebook::velox::Type const> const&, facebook::velox::core::QueryConfig const&)(Unknown Source) at Unknown.# 4 std::_Function_handler<std::unique_ptr<facebook::velox::exec::WindowFunction, std::default_delete<facebook::velox::exec::WindowFunction> > (std::vector<facebook::velox::exec::WindowFunctionArg, std::allocator<facebook::velox::exec::WindowFunctionArg> > const&, std::shared_ptr<facebook::velox::Type const> const&, bool, facebook::velox::memory::MemoryPool*, facebook::velox::HashStringAllocator*, facebook::velox::core::QueryConfig const&), facebook::velox::exec::registerAggregateWindowFunction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::$_0>::_M_invoke(std::_Any_data const&, std::vector<facebook::velox::exec::WindowFunctionArg, std::allocator<facebook::velox::exec::WindowFunctionArg> > const&, std::shared_ptr<facebook::velox::Type const> const&, bool&&, facebook::velox::memory::MemoryPool*&&, facebook::velox::HashStringAllocator*&&, facebook::velox::core::QueryConfig const&)(Unknown Source) at Unknown.# 5 facebook::velox::exec::WindowFunction::create(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<facebook::velox::exec::WindowFunctionArg, std::allocator<facebook::velox::exec::WindowFunctionArg> > const&, std::shared_ptr<facebook::velox::Type const> const&, bool, facebook::velox::memory::MemoryPool*, facebook::velox::HashStringAllocator*, facebook::velox::core::QueryConfig const&)(Unknown Source) at Unknown.# 6 facebook::velox::exec::Window::createWindowFunctions()(Unknown Source) at Unknown.# 7 facebook::velox::exec::Window::initialize()(Unknown Source) ``` Pull Request resolved: #7188 Reviewed By: pedroerp Differential Revision: D50557644 Pulled By: mbasmanova fbshipit-source-id: 10fe13d3c4f16cc07334d605f659b9077c2cbefb
- Loading branch information