CS186 Projects
  • Overview
  • Assignments
    • Project 0: Setup
      • Getting Started
      • Your Tasks
      • Submitting the Assignment
    • Project 1: SQL
      • Getting Started
      • SQL vs. SQLite
      • Your Tasks
      • Testing
      • Submitting the Assignment
    • Project 2: B+ Trees
      • Getting Started
      • Your Tasks
      • Testing
      • Submitting the Assignment
    • Project 3: Joins and Query Optimization
      • Getting Started
      • Part 0: Skeleton Code
      • Part 1: Join Algorithms
        • Task 1 Debugging
        • Task 2 Common Errors
      • Part 2: Query Optimization
      • Testing
      • Submitting the Assignment
    • Project 4: Concurrency
      • Getting Started
      • Part 0: Skeleton Code
      • Part 1: Queuing
      • Part 2: Multigranularity
      • Testing
      • Submitting the Assignment
    • Project 5: Recovery
      • Getting Started
      • Your Tasks
      • Testing
      • Submitting the Assignment
    • Project 6: NoSQL
      • Getting Started
      • Your Tasks
      • Submitting the Assignment
  • Common
    • Adding a partner on GitHub
    • Development Container Setup
    • Miscellaneous
      • Nested Loop Join Animations
Powered by GitBook
On this page
  • Index out of bounds error while partitioning
  • Reached the max number of passes cap
  • Code running forever/recursion depth limit exceeded/java.lang.OutOfMemoryError
  • AssertionError: Expected: 1674 Actual: 91
  1. Assignments
  2. Project 3: Joins and Query Optimization
  3. Part 1: Join Algorithms

Task 2 Common Errors

PreviousTask 1 DebuggingNextPart 2: Query Optimization

Last updated 2 months ago

Index out of bounds error while partitioning

Hash codes can be negative. Make sure you handle that case. The hash codes can also be larger than the number of partitions, so make sure you handle that too. We recommend you look at s implementation to make sure you partition correctly with hash codes.

Reached the max number of passes cap

This means that you're doing recursive partitioning infinitely. The most likely cause of this is partitioning using the the same hash function every single time. Make sure to update your hash func calls so that the hash function is updated each time.

If you're certain that you're doing both of those things, make sure your condition for recursive partitioning is correct. An off by one (for example <= vs < ) is enough to make it so you never reach the build and probe phase.

Code running forever/recursion depth limit exceeded/java.lang.OutOfMemoryError

Make sure every time you make a recursive call to run that you increment the pass number.

AssertionError: Expected: 1674 Actual: 91

Make sure when you recursively call run that you add all of the resulting records to your output. Additionally make sure that whenever you call buildAndProbe that you also add those records to your output.

SHJOperator'