Skip to content

Commit 1244483

Browse files
committed
Identifier.append
1 parent 4abf8f1 commit 1244483

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

mindsdb_sql_parser/ast/select/identifier.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ def from_path_str(self, value, *args, **kwargs):
6969
parts, _ = path_str_to_parts(value)
7070
return Identifier(parts=parts, *args, **kwargs)
7171

72+
def append(self, other: "Identifier") -> None:
73+
self.parts += other.parts
74+
self.is_quoted += other.is_quoted
75+
7276
def parts_to_str(self):
7377
out_parts = []
7478
reserved_words = get_reserved_words()

mindsdb_sql_parser/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def show(self, p):
537537
value0 = command.from_table
538538
value1 = p.identifier
539539
if value0 is not None:
540-
value1.parts = value1.parts + value0.parts
540+
value1.append(value0)
541541

542542
command.from_table = value1
543543
return command
@@ -548,7 +548,7 @@ def show(self, p):
548548
value0 = command.in_table
549549
value1 = p.identifier
550550
if value0 is not None:
551-
value1.parts = value1.parts + value0.parts
551+
value1.append(value0)
552552

553553
command.in_table = value1
554554
return command

0 commit comments

Comments
 (0)