• 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/create_udf_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 pathlib import Path
×
16
from typing import List
×
17

18
from evadb.catalog.models.udf_io_catalog import UdfIOCatalogEntry
×
19
from evadb.catalog.models.udf_metadata_catalog import UdfMetadataCatalogEntry
×
20
from evadb.plan_nodes.abstract_plan import AbstractPlan
×
21
from evadb.plan_nodes.types import PlanOprType
×
22

23

24
class CreateUDFPlan(AbstractPlan):
×
25
    """
26
    This plan is used for storing information required to create udf operators
27

28
    Attributes:
29
        name: str
30
            udf_name provided by the user required
31
        if_not_exists: bool
32
            if true should throw an error if udf with same name exists
33
            else will replace the existing
34
        inputs: List[UdfIOCatalogEntry]
35
            udf inputs, annotated list similar to table columns
36
        outputs: List[UdfIOCatalogEntry]
37
            udf outputs, annotated list similar to table columns
38
        impl_file_path: Path
39
            file path which holds the implementation of the udf.
40
        udf_type: str
41
            udf type. it ca be object detection, classification etc.
42
    """
43

44
    def __init__(
×
45
        self,
46
        name: str,
47
        if_not_exists: bool,
48
        inputs: List[UdfIOCatalogEntry],
49
        outputs: List[UdfIOCatalogEntry],
50
        impl_file_path: Path,
51
        udf_type: str = None,
52
        metadata: List[UdfMetadataCatalogEntry] = None,
53
    ):
54
        super().__init__(PlanOprType.CREATE_UDF)
×
55
        self._name = name
×
56
        self._if_not_exists = if_not_exists
×
57
        self._inputs = inputs
×
58
        self._outputs = outputs
×
59
        self._impl_path = impl_file_path
×
60
        self._udf_type = udf_type
×
61
        self._metadata = metadata
×
62

63
    @property
×
64
    def name(self):
×
65
        return self._name
×
66

67
    @property
×
68
    def if_not_exists(self):
×
69
        return self._if_not_exists
×
70

71
    @property
×
72
    def inputs(self):
×
73
        return self._inputs
×
74

75
    @property
×
76
    def outputs(self):
×
77
        return self._outputs
×
78

79
    @property
×
80
    def impl_path(self):
×
81
        return self._impl_path
×
82

83
    @property
×
84
    def udf_type(self):
×
85
        return self._udf_type
×
86

87
    @property
×
88
    def metadata(self):
×
89
        return self._metadata
×
90

91
    def __str__(self):
×
92
        return "CreateUDFPlan(name={}, \
×
93
            if_not_exists={}, \
94
            inputs={}, \
95
            outputs={}, \
96
            impl_file_path={}, \
97
            udf_type={}, \
98
            metadata={})".format(
99
            self._name,
100
            self._if_not_exists,
101
            self._inputs,
102
            self._outputs,
103
            self._impl_path,
104
            self._udf_type,
105
            self._metadata,
106
        )
107

108
    def __hash__(self) -> int:
×
109
        return hash(
×
110
            (
111
                super().__hash__(),
112
                self.if_not_exists,
113
                tuple(self.inputs),
114
                tuple(self.outputs),
115
                self.impl_path,
116
                self.udf_type,
117
                tuple(self.metadata),
118
            )
119
        )
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