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

georgia-tech-db / eva / 7c1c5cb7-cb1e-4c69-985c-b642250357b6

28 Oct 2023 10:44PM UTC coverage: 76.956% (-1.7%) from 78.704%
7c1c5cb7-cb1e-4c69-985c-b642250357b6

push

circle-ci

xzdandy
Fix list

8990 of 11682 relevant lines covered (76.96%)

1.73 hits per line

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

50.0
/evadb/executor/nested_loop_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.
15
from typing import Iterator
2✔
16

17
from evadb.database import EvaDBDatabase
2✔
18
from evadb.executor.abstract_executor import AbstractExecutor
2✔
19
from evadb.executor.executor_utils import (
2✔
20
    apply_predicate,
21
    instrument_function_expression_cost,
22
)
23
from evadb.models.storage.batch import Batch
2✔
24
from evadb.plan_nodes.nested_loop_join_plan import NestedLoopJoinPlan
2✔
25

26

27
class NestedLoopJoinExecutor(AbstractExecutor):
2✔
28
    def __init__(self, db: EvaDBDatabase, node: NestedLoopJoinPlan):
2✔
29
        super().__init__(db, node)
1✔
30
        self.predicate = node.join_predicate
1✔
31

32
    def exec(self, *args, **kwargs) -> Iterator[Batch]:
2✔
33
        outer = self.children[0]
×
34
        inner = self.children[1]
×
35
        for row1 in outer.exec(**kwargs):
×
36
            for row2 in inner.exec(**kwargs):
×
37
                result_batch = Batch.join(row1, row2)
×
38
                result_batch.reset_index()
×
39
                result_batch = apply_predicate(result_batch, self.predicate)
×
40
                if not result_batch.empty():
×
41
                    yield result_batch
×
42

43
        # instrument required stats
44
        if self.predicate:
×
45
            instrument_function_expression_cost(self.predicate, self.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

© 2025 Coveralls, Inc