Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(hashjoin): Add extra output capacity for left semi join #12108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhli1142015
Copy link
Contributor

Fix the issue below, repro UT is added also.

E0117 13:19:37.833635 1938231 JoinFuzzer.cpp:1562] ==============================> Started iteration 700 (seed: 3326651276)
E0117 13:19:37.836191 1938231 JoinFuzzer.cpp:539] Executing query plan with UNGROUPED strategy[0 groups]:
-- HashJoin[2][LEFT SEMI (PROJECT) t0=u0 AND t1=u1, filter: eq(ROW["tp2"],ROW["bp2"])] -> tp3:REAL, match:BOOLEAN
  -- Values[0][10240 rows in 10 vectors] -> t0:DOUBLE, t1:DATE, tp2:BOOLEAN, tp3:REAL, tp4:SMALLINT, tp5:INTEGER
  -- Values[1][1290 rows in 10 vectors] -> u0:DOUBLE, u1:DATE, bp2:BOOLEAN
E0117 13:19:37.874596 1938231 JoinFuzzer.cpp:539] Executing query plan with UNGROUPED strategy[0 groups]:
-- HashJoin[2][LEFT SEMI (PROJECT) t0=u0 AND t1=u1, filter: eq(ROW["tp2"],ROW["bp2"])] -> tp3:REAL, match:BOOLEAN
  -- Values[0][10240 rows in 10 vectors] -> t0:DOUBLE, t1:DATE, tp2:BOOLEAN, tp3:REAL, tp4:SMALLINT, tp5:INTEGER
  -- Values[1][1290 rows in 10 vectors] -> u0:DOUBLE, u1:DATE, bp2:BOOLEAN
E0117 13:19:37.875802 1938231 JoinFuzzer.cpp:539] Executing query plan with UNGROUPED strategy[0 groups] and spilling injection:
-- HashJoin[2][LEFT SEMI (PROJECT) t0=u0 AND t1=u1, filter: eq(ROW["tp2"],ROW["bp2"])] -> tp3:REAL, match:BOOLEAN
  -- Values[0][10240 rows in 10 vectors] -> t0:DOUBLE, t1:DATE, tp2:BOOLEAN, tp3:REAL, tp4:SMALLINT, tp5:INTEGER
  -- Values[1][1290 rows in 10 vectors] -> u0:DOUBLE, u1:DATE, bp2:BOOLEAN

E0117 13:19:37.878841 2044573 Exceptions.h:66] Line: /var/git/velox/velox/exec/HashProbe.cpp:1622, Function:evalFilter, Expression: numPassed <= outputTableRowsCapacity_ (1025 vs. 1024), Source: RUNTIME, ErrorCode: INVALID_STATE
terminate called after throwing an instance of 'facebook::velox::VeloxRuntimeError'
  what():  Exception: VeloxRuntimeError
Error Source: RUNTIME
Error Code: INVALID_STATE
Reason: (1025 vs. 1024)
Retriable: False
Expression: numPassed <= outputTableRowsCapacity_
Context: Operator: HashProbe[2] 1
Function: evalFilter
File: /var/git/velox/velox/exec/HashProbe.cpp
Line: 1622
Stack trace:
# 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> >)
# 1  void facebook::velox::detail::veloxCheckFail<facebook::velox::VeloxRuntimeError, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(facebook::velox::detail::VeloxCheckFailArgs const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
# 2  facebook::velox::exec::HashProbe::evalFilter(int, int)
# 3  facebook::velox::exec::HashProbe::getOutputInternal(bool)
# 4  facebook::velox::exec::HashProbe::getOutput()
# 5  facebook::velox::exec::Driver::runInternal(std::shared_ptr<facebook::velox::exec::Driver>&, std::shared_ptr<facebook::velox::exec::BlockingState>&, std::shared_ptr<facebook::velox::RowVector>&)::{lambda()#5}::operator()() const
# 6  facebook::velox::exec::Driver::runInternal(std::shared_ptr<facebook::velox::exec::Driver>&, std::shared_ptr<facebook::velox::exec::BlockingState>&, std::shared_ptr<facebook::velox::RowVector>&)
# 7  facebook::velox::exec::Driver::run(std::shared_ptr<facebook::velox::exec::Driver>)
# 8  void folly::detail::function::call_<facebook::velox::exec::Driver::enqueue(std::shared_ptr<facebook::velox::exec::Driver>)::{lambda()#1}, true, false, void>(, folly::detail::function::Data&)
# 9  folly::ThreadPoolExecutor::runTask(std::shared_ptr<folly::ThreadPoolExecutor::Thread> const&, folly::ThreadPoolExecutor::Task&&)
# 10 folly::CPUThreadPoolExecutor::threadRun(std::shared_ptr<folly::ThreadPoolExecutor::Thread>)
# 11 void folly::detail::function::call_<std::_Bind<void (folly::ThreadPoolExecutor::*(folly::ThreadPoolExecutor*, std::shared_ptr<folly::ThreadPoolExecutor::Thread>))(std::shared_ptr<folly::ThreadPoolExecutor::Thread>)>, true, false, void>(, folly::detail::function::Data&)
# 12 0x00000000000dc252
# 13 0x0000000000094ac2
# 14 0x000000000012684f

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 17, 2025
Copy link

netlify bot commented Jan 17, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 10e5e35
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/678a16e911325900089d5f84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants