• 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/_load_statement.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 lark.tree import Tree
×
16

17
from evadb.parser.load_statement import LoadDataStatement
×
18
from evadb.parser.types import FileFormatType
×
19

20

21
class Load:
×
22
    def load_statement(self, tree):
×
23
        # Set default file_format
24
        file_format = FileFormatType.VIDEO
×
25
        file_format = self.visit(tree.children[1])
×
26

27
        # Set default for file_format as Video
28
        file_options = {}
×
29
        file_options["file_format"] = file_format
×
30

31
        file_path = self.visit(tree.children[2]).value
×
32
        table = self.visit(tree.children[4])
×
33

34
        # set default for column_list as None
35
        column_list = None
×
36
        for child in tree.children:
×
37
            if isinstance(child, Tree):
×
38
                if child.data == "uid_list":
×
39
                    column_list = self.visit(child)
×
40

41
        stmt = LoadDataStatement(table, file_path, column_list, file_options)
×
42
        return stmt
×
43

44
    def file_format(self, tree):
×
45
        file_format = None
×
46
        file_format_string = tree.children[0]
×
47

48
        if file_format_string == "VIDEO":
×
49
            file_format = FileFormatType.VIDEO
×
50
        elif file_format_string == "CSV":
×
51
            file_format = FileFormatType.CSV
×
52
        elif file_format_string == "IMAGE":
×
53
            file_format = FileFormatType.IMAGE
×
54
        elif file_format_string == "DOCUMENT":
×
55
            file_format = FileFormatType.DOCUMENT
×
56
        elif file_format_string == "PDF":
×
57
            file_format = FileFormatType.PDF
×
58

59
        return file_format
×
60

61
    def file_options(self, tree):
×
62
        file_options = {}
×
63
        file_format = self.visit(tree.children[1])
×
64
        file_options["file_format"] = file_format
×
65
        return file_options
×
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