Commit 233bc93
octo-patch
fix: use schemaName as fallback for databaseName in Hive DDL/columns/view queries (fixes #1745)
In Hive, schema and database represent the same concept. When a client passes
schemaName without databaseName (e.g. from the DDL export endpoint), the SQL
was generated as `SHOW CREATE TABLE null.table_name`, causing a SemanticException.
Apply the same schemaName fallback in tableDDL(), columns(), and view() so all
three operations work correctly regardless of which field the caller populates.1 parent 4068ed2 commit 233bc93
1 file changed
Lines changed: 9 additions & 3 deletions
File tree
- chat2db-server/chat2db-plugins/chat2db-hive/src/main/java/ai/chat2db/plugin/hive
chat2db-server/chat2db-plugins/chat2db-hive/src/main/java/ai/chat2db/plugin/hive/HiveMetaData.java
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
100 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| |||
268 | 272 | | |
269 | 273 | | |
270 | 274 | | |
271 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
272 | 278 | | |
273 | 279 | | |
274 | 280 | | |
| |||
0 commit comments