Commit 063cf4b
authored
HCK-14785: RE relationships (#90)
<!--do not remove this marker, its needed to replace info when ticket
title is updated -->
<!--jira-description-action-hidden-marker-start-->
<table>
<td>
<a href="https://hackolade.atlassian.net/browse/HCK-14785"
title="HCK-14785" target="_blank"><img alt="Sub-bug"
src="https://hackolade.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10303?size=medium"
/>HCK-14785</a> [DB2][RE from instance] relationships aren't REed from
instance if schema name length is less than 8
</td></table>
<br />
<!--jira-description-action-hidden-marker-end-->
## Content:
* normalized schema names in DDL statements on RE.
## Technical details
* The PR fixes the behavior of `CALL SYSPROC.DB2LK_GENERATE_DDL`, where
the schema names are right padded by default. For examples:
* schema name in the model is `x`
* after applying it to the instance, trying to reverse it back as DDL
will return:
```sql
-- "x"."t" definition
CREATE TABLE "x "."t" (
"c1" VARCHAR(20 OCTETS) )
IN "IBMDB2SAMPLEREL"
ORGANIZE BY ROW;
```
* This happens because the schema name was created as a fixed-length
`CHAR` value (default `8`) and is blank-padded internally to full
length.
* This impacts the internal resolution of references on most levels
(relationships, types, columns, views, etc.)1 parent d8c3b3a commit 063cf4b
2 files changed
Lines changed: 22 additions & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
11 | 20 | | |
12 | 21 | | |
13 | 22 | | |
| |||
109 | 118 | | |
110 | 119 | | |
111 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
112 | 131 | | |
113 | 132 | | |
114 | 133 | | |
| |||
119 | 138 | | |
120 | 139 | | |
121 | 140 | | |
| 141 | + | |
| 142 | + | |
122 | 143 | | |
123 | 144 | | |
124 | 145 | | |
| |||
0 commit comments