• 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/parser/lark_visitor/_common_clauses_ids.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

16
from evadb.catalog.catalog_type import Dimension
×
17
from evadb.expression.tuple_value_expression import TupleValueExpression
×
18
from evadb.parser.table_ref import TableInfo
×
19
from evadb.utils.logging_manager import logger
×
20

21

22
class CommonClauses:
×
23
    def table_name(self, tree):
×
24
        child = self.visit(tree.children[0])
×
25
        if isinstance(child, tuple):
×
26
            database_name, table_name = child[0], child[1]
×
27
        else:
28
            database_name, table_name = None, child
×
29

30
        if table_name is not None:
×
31
            return TableInfo(table_name=table_name, database_name=database_name)
×
32
        else:
33
            error = "Invalid Table Name"
×
34
            logger.error(error)
×
35

36
    def full_id(self, tree):
×
37
        if len(tree.children) == 1:
×
38
            # Table only
39
            return self.visit(tree.children[0])
×
40
        elif len(tree.children) == 2:
×
41
            # Data source and table
42
            # Ex. DemoDB.TestTable
43
            return (self.visit(tree.children[0]), self.visit(tree.children[1]))
×
44

45
    def uid(self, tree):
×
46
        return self.visit(tree.children[0])
×
47

48
    def full_column_name(self, tree):
×
49
        uid = self.visit(tree.children[0])
×
50

51
        # check for dottedid
52
        if len(tree.children) > 1:
×
53
            dotted_id = self.visit(tree.children[1])
×
54
            return TupleValueExpression(table_alias=uid, name=dotted_id)
×
55
        else:
56
            return TupleValueExpression(name=uid)
×
57

58
    def dotted_id(self, tree):
×
59
        dotted_id = str(tree.children[0])
×
60
        dotted_id = dotted_id.lstrip(".")
×
61
        return dotted_id
×
62

63
    def simple_id(self, tree):
×
64
        simple_id = str(tree.children[0])
×
65
        return simple_id
×
66

67
    def decimal_literal(self, tree):
×
68
        decimal = None
×
69
        token = tree.children[0]
×
70
        if str.upper(token) == "ANYDIM":
×
71
            decimal = Dimension.ANYDIM
×
72
        else:
73
            decimal = int(str(token))
×
74
        return decimal
×
75

76
    def real_literal(self, tree):
×
77
        real_literal = float(tree.children[0])
×
78
        return real_literal
×
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