From d8ab29563b8f37ba46805ed2d30019eec1e3d173 Mon Sep 17 00:00:00 2001 From: ivan-m-dev Date: Fri, 13 Feb 2026 14:42:26 +0100 Subject: [PATCH 1/2] HCK-14814: add name and expression check --- forward_engineering/helpers/tableHelper.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/forward_engineering/helpers/tableHelper.js b/forward_engineering/helpers/tableHelper.js index dcb3941..5ca4778 100644 --- a/forward_engineering/helpers/tableHelper.js +++ b/forward_engineering/helpers/tableHelper.js @@ -777,8 +777,15 @@ const getCreateStreamingStatement = ({ if (expectations && expectations.length > 0) { const expectationsSql = expectations.map(exp => { + const name = exp.expectationName?.trim(); + const expr = exp.expectationExpr?.trim(); + + if (!name || !expr) { + return null; + } + const action = exp.expectationAction ? ` ON VIOLATION ${exp.expectationAction}` : ''; - return `CONSTRAINT ${exp.expectationName} EXPECT (${exp.expectationExpr})${action}`; + return `CONSTRAINT ${name} EXPECT (${expr})${action}`; }); tableStructureLines.push(...expectationsSql); } From a6ec69c51afdc62b9e11964ab813511cd28210d2 Mon Sep 17 00:00:00 2001 From: ivan-m-dev Date: Fri, 13 Feb 2026 15:11:04 +0100 Subject: [PATCH 2/2] trigger sonar