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

901 inner join and semi join with result cardinality hint #918

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Nov 18, 2024

  1. Add numRowRes Argument to InnerJoin and SemiJoin

    - Introduced `numRowRes` as a parameter for `InnerJoin` and `SemiJoin` kernel functions, indicating the size of the result.
    - In `InnerJoin`:
      - If `numRowRes` is -1, the result size is set to `numRowRhs * numRowLhs`.
      - Otherwise, the result size is determined by `numRowRes`.
    - In `SemiJoin`:
      - If `numRowRes` is -1, the result size defaults to `numRowLhs`.
      - Otherwise, the result size is determined by `numRowRes`.
    - Updated DaphneDSL:
      - Added `numRowRes` as an optional parameter for `innerJoin` and `semiJoin` built-in functions.
      - If not provided, `numRowRes` defaults to -1, which is passed to DaphneIR operations.
    - Modified DaphneIR:
      - Made `numRowRes` a mandatory argument for `InnerJoinOp` and `SemiJoinOp`.
    - Implementation Updates:
      - Updated `DaphneDSLBuiltins.cpp` to handle default `numRowRes` values.
      - Set `numRowRes` to -1 in `SQLVisitor.cpp` for compatibility.
      - Adjusted `kernels.json` to reflect the new parameter in `innerJoin` and `semiJoin`.
    - Added script-level test cases to validate the new functionality.
    - Addresses issue `daphne-eu#901` by allowing users to specify result size to prevent over-allocation.
    saminbassiri committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    e814a8d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    93e1e1a View commit details
    Browse the repository at this point in the history