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

georgia-tech-db / eva / 4b6483e2-f106-4d6a-9989-6ae44deb0b74

24 Aug 2023 10:20PM UTC coverage: 93.342% (-0.2%) from 93.514%
4b6483e2-f106-4d6a-9989-6ae44deb0b74

push

circle-ci

web-flow
Auto drop row id for `CREATE UDF xxx FROM ( SELECT * FROM ...) ...` (#943)

👋 Thanks for submitting a Pull Request to EvaDB!

🙌 We want to make contributing to EvaDB as easy and transparent as
possible. Here are a few tips to get you started:

- 🔍 Search existing EvaDB
[PRs](https://github.com/georgia-tech-db/eva/pulls) to see if a similar
PR already exists.
- 🔗 Link this PR to a EvaDB
[issue](https://github.com/georgia-tech-db/eva/issues) to help us
understand what bug fix or feature is being implemented.
- 📈 Provide before and after profiling results to help us quantify the
improvement your PR provides (if applicable).

👉 Please see our ✅ [Contributing
Guide](https://evadb.readthedocs.io/en/stable/source/contribute/index.html)
for more details.

10 of 10 new or added lines in 2 files covered. (100.0%)

10431 of 11175 relevant lines covered (93.34%)

0.93 hits per line

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

96.3
/evadb/executor/storage_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
1✔
16

17
from evadb.catalog.catalog_type import TableType
1✔
18
from evadb.database import EvaDBDatabase
1✔
19
from evadb.executor.abstract_executor import AbstractExecutor
1✔
20
from evadb.executor.executor_utils import ExecutorError
1✔
21
from evadb.models.storage.batch import Batch
1✔
22
from evadb.plan_nodes.storage_plan import StoragePlan
1✔
23
from evadb.storage.storage_engine import StorageEngine
1✔
24
from evadb.utils.logging_manager import logger
1✔
25

26

27
class StorageExecutor(AbstractExecutor):
1✔
28
    def __init__(self, db: EvaDBDatabase, node: StoragePlan):
1✔
29
        super().__init__(db, node)
1✔
30

31
    def exec(self, *args, **kwargs) -> Iterator[Batch]:
1✔
32
        try:
1✔
33
            storage_engine = StorageEngine.factory(self.db, self.node.table)
1✔
34

35
            if self.node.table.table_type == TableType.VIDEO_DATA:
1✔
36
                return storage_engine.read(
1✔
37
                    self.node.table,
38
                    self.node.batch_mem_size,
39
                    predicate=self.node.predicate,
40
                    sampling_rate=self.node.sampling_rate,
41
                    sampling_type=self.node.sampling_type,
42
                    read_audio=self.node.table_ref.get_audio,
43
                    read_video=self.node.table_ref.get_video,
44
                )
45
            elif self.node.table.table_type == TableType.IMAGE_DATA:
1✔
46
                return storage_engine.read(self.node.table)
1✔
47
            elif self.node.table.table_type == TableType.DOCUMENT_DATA:
1✔
48
                return storage_engine.read(self.node.table, self.node.chunk_params)
1✔
49
            elif self.node.table.table_type == TableType.STRUCTURED_DATA:
1✔
50
                return storage_engine.read(self.node.table, self.node.batch_mem_size)
1✔
51
            elif self.node.table.table_type == TableType.NATIVE_DATA:
1✔
52
                return storage_engine.read(
×
53
                    self.node.table_ref.table.database_name, self.node.table
54
                )
55
            elif self.node.table.table_type == TableType.PDF_DATA:
1✔
56
                return storage_engine.read(self.node.table)
1✔
57
            else:
58
                raise ExecutorError(
59
                    f"Unsupported TableType {self.node.table.table_type} encountered"
60
                )
61
        except Exception as e:
62
            logger.error(e)
63
            raise ExecutorError(e)
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