• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

georgia-tech-db / eva / #850

08 Nov 2023 08:36PM UTC coverage: 0.0% (-77.0%) from 76.982%
#850

push

circleci

americast
fix metrics logic

0 of 1 new or added line in 1 file covered. (0.0%)

9789 existing lines in 252 files now uncovered.

0 of 12428 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/evadb/executor/hash_join_executor.py
1
# coding=utf-8
2
# Copyright 2018-2023 EvaDB
3
#
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
# you may not use this file except in compliance with the License.
6
# You may obtain a copy of the License at
7
#
8
#     http://www.apache.org/licenses/LICENSE-2.0
9
#
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
# See the License for the specific language governing permissions and
14
# limitations under the License.
UNCOV
15
from typing import Iterator
×
16

UNCOV
17
from evadb.database import EvaDBDatabase
×
UNCOV
18
from evadb.executor.abstract_executor import AbstractExecutor
×
UNCOV
19
from evadb.executor.executor_utils import (
×
20
    apply_predicate,
21
    apply_project,
22
    instrument_function_expression_cost,
23
)
UNCOV
24
from evadb.models.storage.batch import Batch
×
UNCOV
25
from evadb.plan_nodes.hash_join_probe_plan import HashJoinProbePlan
×
26

27

UNCOV
28
class HashJoinExecutor(AbstractExecutor):
×
UNCOV
29
    def __init__(self, db: EvaDBDatabase, node: HashJoinProbePlan):
×
UNCOV
30
        super().__init__(db, node)
×
UNCOV
31
        self.predicate = node.join_predicate
×
UNCOV
32
        self.join_type = node.join_type
×
UNCOV
33
        self.probe_keys = node.probe_keys
×
UNCOV
34
        self.join_project = node.join_project
×
35

UNCOV
36
    def exec(self, *args, **kwargs) -> Iterator[Batch]:
×
UNCOV
37
        build_table = self.children[0]
×
UNCOV
38
        probe_table = self.children[1]
×
UNCOV
39
        hash_keys = [key.col_alias for key in self.probe_keys]
×
UNCOV
40
        for build_batch in build_table.exec():
×
UNCOV
41
            for probe_batch in probe_table.exec():
×
UNCOV
42
                probe_batch.reassign_indices_to_hash(hash_keys)
×
UNCOV
43
                join_batch = Batch.join(probe_batch, build_batch)
×
UNCOV
44
                join_batch.reset_index()
×
UNCOV
45
                join_batch = apply_predicate(join_batch, self.predicate)
×
UNCOV
46
                join_batch = apply_project(join_batch, self.join_project)
×
UNCOV
47
                yield join_batch
×
48

49
        # instrument required stats
UNCOV
50
        if self.predicate or self.join_project:
×
UNCOV
51
            catalog = self.catalog()
×
UNCOV
52
            instrument_function_expression_cost(self.predicate, catalog)
×
UNCOV
53
            instrument_function_expression_cost(self.join_project, catalog)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc