Skip to content

Commit 1f9c61f

Browse files
Fix extractTableName to check identifier before appending dot
Addresses PR feedback: Only append dot after database identifier if table identifier is not null to avoid trailing dots.
1 parent 185c626 commit 1f9c61f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jdbc-v2/src/main/java/com/clickhouse/jdbc/internal/SqlParserFacade.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,11 @@ private String extractTableName(ClickHouseParser.TableIdentifierContext tableId)
283283
}
284284
tableName.append(SQLUtils.unquoteIdentifier(dbParts.get(i).getText()));
285285
}
286-
tableName.append('.');
286+
287+
// Only append dot if table identifier exists
288+
if (tableId.identifier() != null) {
289+
tableName.append('.');
290+
}
287291
}
288292

289293
// Handle table identifier

0 commit comments

Comments
 (0)