Skip to content

Commit

Permalink
Don't try to convert Aggregate node without Strategy
Browse files Browse the repository at this point in the history
If Strategy property is present this means that it comes from JSON.
Without this prop, the node doesn't need to be converted.
  • Loading branch information
pgiraud committed Oct 9, 2024
1 parent 1225df0 commit 26825f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/plan-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ export class PlanService {

private convertNodeType(node: Node): void {
// Convert some node type (possibly from JSON source) to match the TEXT format
if (node[NodeProp.NODE_TYPE] == "Aggregate") {
if (node[NodeProp.NODE_TYPE] == "Aggregate" && node[NodeProp.STRATEGY]) {
let prefix = ""
switch (node[NodeProp.STRATEGY]) {
case "Sorted":
Expand Down

0 comments on commit 26825f0

Please sign in to comment.