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

georgia-tech-db / eva / #758

04 Sep 2023 08:37PM UTC coverage: 0.0% (-78.3%) from 78.333%
#758

push

circle-ci

hershd23
Increased underline length in at line 75 in text_summarization.rst
	modified:   docs/source/benchmarks/text_summarization.rst

0 of 11303 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/plan_nodes/storage_plan.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 evadb.catalog.models.table_catalog import TableCatalogEntry
×
16
from evadb.expression.abstract_expression import AbstractExpression
×
17
from evadb.parser.table_ref import TableRef
×
18
from evadb.plan_nodes.abstract_plan import AbstractPlan
×
19
from evadb.plan_nodes.types import PlanOprType
×
20

21

22
class StoragePlan(AbstractPlan):
×
23
    """
24
    This is the plan used for retrieving the frames from the storage and
25
    and returning to the higher levels.
26

27
    Arguments:
28
        table (TableCatalogEntry): table for fetching data
29
        batch_mem_size (int): memory size of the batch read from disk
30
        skip_frames (int): skip frequency
31
        offset (int): storage offset for retrieving data
32
        limit (int): limit on data records to be retrieved
33
        total_shards (int): number of shards of data (if sharded)
34
        curr_shard (int): current curr_shard if data is sharded
35
        sampling_rate (int): uniform sampling rate
36
        sampling_type (str): special sampling type like IFRAMES
37
    """
38

39
    def __init__(
×
40
        self,
41
        table: TableCatalogEntry,
42
        table_ref: TableRef,
43
        skip_frames: int = 0,
44
        offset: int = None,
45
        limit: int = None,
46
        total_shards: int = 0,
47
        curr_shard: int = 0,
48
        predicate: AbstractExpression = None,
49
        sampling_rate: int = None,
50
        batch_mem_size: int = 30000000,
51
        sampling_type: str = None,
52
        chunk_params: dict = {},
53
    ):
54
        super().__init__(PlanOprType.STORAGE_PLAN)
×
55
        self._table = table
×
56
        self._table_ref = table_ref
×
57
        self._batch_mem_size = batch_mem_size
×
58
        self._skip_frames = skip_frames
×
59
        self._offset = offset
×
60
        self._limit = limit
×
61
        self._total_shards = total_shards
×
62
        self._curr_shard = curr_shard
×
63
        self._predicate = predicate
×
64
        self._sampling_rate = sampling_rate
×
65
        self._sampling_type = sampling_type
×
66
        self.chunk_params = chunk_params
×
67

68
    @property
×
69
    def table(self):
×
70
        return self._table
×
71

72
    @property
×
73
    def table_ref(self):
×
74
        return self._table_ref
×
75

76
    @property
×
77
    def batch_mem_size(self):
×
78
        return self._batch_mem_size
×
79

80
    @property
×
81
    def skip_frames(self):
×
82
        return self._skip_frames
×
83

84
    @property
×
85
    def offset(self):
×
86
        return self._offset
×
87

88
    @property
×
89
    def limit(self):
×
90
        return self._limit
×
91

92
    @property
×
93
    def total_shards(self):
×
94
        return self._total_shards
×
95

96
    @property
×
97
    def curr_shard(self):
×
98
        return self._curr_shard
×
99

100
    @property
×
101
    def predicate(self):
×
102
        return self._predicate
×
103

104
    @property
×
105
    def sampling_rate(self):
×
106
        return self._sampling_rate
×
107

108
    @property
×
109
    def sampling_type(self):
×
110
        return self._sampling_type
×
111

112
    def __str__(self):
×
113
        return "StoragePlan(video={}, \
×
114
            table_ref={},\
115
            batch_mem_size={}, \
116
            skip_frames={}, \
117
            offset={}, \
118
            limit={}, \
119
            total_shards={}, \
120
            curr_shard={}, \
121
            predicate={}, \
122
            sampling_rate={}, \
123
            sampling_type={})".format(
124
            self._table,
125
            self._table_ref,
126
            self._batch_mem_size,
127
            self._skip_frames,
128
            self._offset,
129
            self._limit,
130
            self._total_shards,
131
            self._curr_shard,
132
            self._predicate,
133
            self._sampling_rate,
134
            self._sampling_type,
135
        )
136

137
    def __hash__(self) -> int:
×
138
        return hash(
×
139
            (
140
                super().__hash__(),
141
                self.table,
142
                self.table_ref,
143
                self.batch_mem_size,
144
                self.skip_frames,
145
                self.offset,
146
                self.limit,
147
                self.total_shards,
148
                self.curr_shard,
149
                self.predicate,
150
                self.sampling_rate,
151
                self.sampling_type,
152
                frozenset(self.chunk_params.items()),
153
            )
154
        )
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