@rex0220/kintone-sql-tools 3.83.0 → 3.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cli/ksql.js +5 -4
- package/dist-engine/index.cjs +3 -3
- package/dist-engine/index.mjs +3 -3
- package/dist-engine/ksql-engine.umd.js +3 -3
- package/dist-engine/meta/bundle-baseline.json +7 -7
- package/dist-engine/meta/cjs.json +5 -5
- package/dist-engine/meta/esm.json +5 -5
- package/dist-engine/meta/umd.json +5 -5
- package/dist-flow/index.cjs +3 -3
- package/dist-flow/index.mjs +3 -3
- package/dist-flow/meta/cjs.json +5 -5
- package/dist-flow/meta/esm.json +5 -5
- package/dist-mcp/ksql-mcp.js +6 -5
- package/dist-mcpb/ksql-mcp.mcpb +0 -0
- package/package.json +1 -1
package/dist-cli/ksql.js
CHANGED
|
@@ -23693,8 +23693,9 @@ function validateGroupingRefMembership(ref, resolve3, canonicalItems) {
|
|
|
23693
23693
|
}
|
|
23694
23694
|
function validateGroupingStatic(stmt) {
|
|
23695
23695
|
const normalized = normalizeGroupingSpec(stmt);
|
|
23696
|
+
const projectedColumns = [...stmt.columns, ...stmt.hiddenWindows ?? []];
|
|
23696
23697
|
const groupingRefs = [];
|
|
23697
|
-
for (const column of
|
|
23698
|
+
for (const column of projectedColumns) {
|
|
23698
23699
|
collectGroupingRefs(column, groupingRefs);
|
|
23699
23700
|
}
|
|
23700
23701
|
collectGroupingRefs(stmt.having, groupingRefs);
|
|
@@ -23702,7 +23703,7 @@ function validateGroupingStatic(stmt) {
|
|
|
23702
23703
|
const forbiddenGroupingRefs = [];
|
|
23703
23704
|
collectGroupingRefs(stmt.where, forbiddenGroupingRefs);
|
|
23704
23705
|
collectGroupingRefs(stmt.joins, forbiddenGroupingRefs);
|
|
23705
|
-
collectAggregateArgumentGroupingRefs(
|
|
23706
|
+
collectAggregateArgumentGroupingRefs(projectedColumns, forbiddenGroupingRefs);
|
|
23706
23707
|
collectAggregateArgumentGroupingRefs(stmt.having, forbiddenGroupingRefs);
|
|
23707
23708
|
if (forbiddenGroupingRefs.length > 0) {
|
|
23708
23709
|
throw new Error(
|
|
@@ -23731,7 +23732,7 @@ function validateGroupingPlanning(stmt, resolve3, planningGuardHook = () => void
|
|
|
23731
23732
|
validateGroupingStatic(stmt);
|
|
23732
23733
|
const normalized = normalizeGroupingSpec(stmt);
|
|
23733
23734
|
const groupingRefs = [];
|
|
23734
|
-
for (const column of stmt.columns) {
|
|
23735
|
+
for (const column of [...stmt.columns, ...stmt.hiddenWindows ?? []]) {
|
|
23735
23736
|
collectGroupingRefs(column, groupingRefs);
|
|
23736
23737
|
}
|
|
23737
23738
|
collectGroupingRefs(stmt.having, groupingRefs);
|
|
@@ -37734,7 +37735,7 @@ async function buildGroupingFieldResolver(stmt, client, cacheContext, materializ
|
|
|
37734
37735
|
async function validateSelectGroupingPlanning(stmt, client, cacheContext, materializedTables) {
|
|
37735
37736
|
resolvedGroupingSpecs.delete(stmt);
|
|
37736
37737
|
const normalized = normalizeGroupingSpec(stmt);
|
|
37737
|
-
const hasGroupingNodes = JSON.stringify(stmt.columns).includes('"GROUPING_') || JSON.stringify(stmt.orderBy).includes('"GROUPING_');
|
|
37738
|
+
const hasGroupingNodes = JSON.stringify(stmt.columns).includes('"GROUPING_') || JSON.stringify(stmt.hiddenWindows ?? []).includes('"GROUPING_') || JSON.stringify(stmt.orderBy).includes('"GROUPING_');
|
|
37738
37739
|
if (normalized.type === "GROUPING_SETS" || hasGroupingNodes) {
|
|
37739
37740
|
const resolver = await buildGroupingFieldResolver(stmt, client, cacheContext, materializedTables);
|
|
37740
37741
|
const resolvedSpec = validateGroupingPlanning(
|