{
  "data": {
    "basis": "RECOMPILED",
    "compilationTrace": {
      "events": [
        {
          "confidence": "EXACT",
          "decision": "NORMALIZED",
          "details": {
            "requestedFieldCount": 4
          },
          "event": "SEMANTIC_DSL_NORMALIZED",
          "observedAt": "2026-10-21T02:00:49.514424900Z",
          "reasonCode": "DSL_NORMALIZED",
          "sequence": 1,
          "stage": "NORMALIZATION",
          "status": "EVALUATED"
        },
        {
          "confidence": "EXACT",
          "decision": "RAW",
          "details": {},
          "event": "PRE_AGGREGATION_ROUTING",
          "observedAt": "2026-10-21T02:00:49.516505600Z",
          "reasonCode": "PREAGG_NOT_CONFIGURED",
          "sequence": 2,
          "stage": "MATERIALIZATION",
          "status": "EVALUATED"
        },
        {
          "confidence": "OBSERVED",
          "decision": "RAW",
          "details": {
            "parameterCount": 3,
            "preAggApplied": false,
            "sourceOfTruth": "QueryExecutionContext.sql",
            "sqlChanged": false
          },
          "event": "FINAL_QUERY_EXECUTION_CONTEXT_CAPTURED",
          "observedAt": "2026-10-21T02:00:49.517548500Z",
          "reasonCode": "PREAGG_NOT_CONFIGURED",
          "sequence": 3,
          "stage": "SQL",
          "status": "EVALUATED"
        }
      ],
      "fieldResolution": [
        {
          "confidence": "EXACT",
          "requested": "albumArtistId",
          "resolved": "albumArtistId",
          "tableField": "artist$id"
        },
        {
          "confidence": "EXACT",
          "requested": "albumArtistName",
          "resolved": "albumArtistName",
          "tableField": "artist$caption"
        },
        {
          "confidence": "OBSERVED",
          "requested": "lineCount",
          "resolved": "lineCount"
        },
        {
          "confidence": "OBSERVED",
          "requested": "totalAmount",
          "resolved": "totalAmount"
        }
      ],
      "normalizedConditions": [
        {
          "confidence": "EXACT",
          "field": "invoice$invoiceDate",
          "operator": "[)",
          "origin": "USER_SLICE",
          "path": "slice[0]",
          "redactedValue": "***",
          "valueType": "LIST<String>"
        },
        {
          "confidence": "EXACT",
          "field": "albumArtistId",
          "operator": "=",
          "origin": "USER_SLICE",
          "path": "slice[1]",
          "redactedValue": "***",
          "valueType": "Integer"
        }
      ],
      "normalizedDsl": {
        "autoFixDimCaption": false,
        "autoGroupBy": true,
        "calculatedFields": [
          {
            "agg": "COUNT",
            "expression": "count(invoiceLineId)",
            "name": "lineCount"
          },
          {
            "agg": "SUM",
            "expression": "sum(lineAmount)",
            "name": "totalAmount"
          }
        ],
        "columns": [
          "albumArtistId",
          "albumArtistName",
          "lineCount",
          "totalAmount"
        ],
        "distinct": false,
        "groupBy": [
          {
            "agg": "null",
            "field": "albumArtistId"
          },
          {
            "agg": "null",
            "field": "albumArtistName"
          },
          {
            "agg": "COUNT",
            "field": "lineCount"
          },
          {
            "agg": "SUM",
            "field": "totalAmount"
          }
        ],
        "optimizeAggSqlEnabled": true,
        "orderBy": [
          {
            "dir": "asc",
            "field": "albumArtistId",
            "nullFirst": false,
            "nullLast": false
          }
        ],
        "postAggregateCalculations": [],
        "queryModel": "MinimalArtistAliasQueryModel",
        "returnTotal": false,
        "slice": [
          {
            "$and": [],
            "$or": [],
            "field": "invoice$invoiceDate",
            "maxDepth": 0,
            "op": "[)",
            "value": "***"
          },
          {
            "$and": [],
            "$or": [],
            "field": "albumArtistId",
            "maxDepth": 0,
            "op": "=",
            "value": "***"
          }
        ],
        "strictColumns": true,
        "withSubtotals": false
      },
      "originalDsl": {
        "captionMatchMode": "EXACT",
        "columns": [
          "albumArtistId",
          "albumArtistName",
          "count(invoiceLineId) as lineCount",
          "sum(lineAmount) as totalAmount"
        ],
        "distinct": false,
        "groupBy": [
          {
            "field": "albumArtistId"
          },
          {
            "field": "albumArtistName"
          }
        ],
        "limit": 5,
        "mismatchHandleStrategy": "ABORT",
        "orderBy": [
          {
            "dir": "asc",
            "field": "albumArtistId",
            "nullFirst": false,
            "nullLast": false
          }
        ],
        "pivotMode": false,
        "returnTotal": false,
        "slice": [
          {
            "field": "invoice$invoiceDate",
            "op": "[)",
            "value": "***"
          },
          {
            "field": "albumArtistId",
            "op": "=",
            "value": "***"
          }
        ],
        "start": 0,
        "withSubtotals": false
      },
      "stagePlan": {
        "dialect": "sqlite",
        "fallbacks": [],
        "preAggOptimizationPolicy": "optimizer-allowed",
        "renderStrategy": "single",
        "returnTotalStrategy": "disabled",
        "stages": [
          {
            "filterAliases": [
              "invoice$invoiceDate",
              "albumArtistId"
            ],
            "id": "row",
            "inputAliases": [],
            "orderAliases": [],
            "outputAliases": [
              "invoice$invoiceDate",
              "albumArtistId",
              "albumArtistName",
              "lineCount",
              "totalAmount"
            ],
            "parameterCount": 3,
            "requiresSqlBoundary": false,
            "sqlAlias": "base",
            "type": "ROW_STAGE"
          },
          {
            "filterAliases": [],
            "id": "agg",
            "inputAliases": [
              "invoice$invoiceDate",
              "albumArtistId",
              "albumArtistName",
              "lineCount",
              "totalAmount"
            ],
            "orderAliases": [],
            "outputAliases": [
              "albumArtistId",
              "albumArtistName",
              "lineCount",
              "totalAmount"
            ],
            "parameterCount": 0,
            "requiresSqlBoundary": false,
            "sqlAlias": "base",
            "type": "AGGREGATE_STAGE"
          },
          {
            "filterAliases": [],
            "id": "final",
            "inputAliases": [
              "albumArtistId",
              "albumArtistName",
              "lineCount",
              "totalAmount"
            ],
            "orderAliases": [
              "albumArtistId"
            ],
            "outputAliases": [
              "albumArtistId",
              "albumArtistName",
              "lineCount",
              "totalAmount"
            ],
            "parameterCount": 0,
            "requiresSqlBoundary": false,
            "sqlAlias": "final",
            "type": "FINAL_STAGE"
          }
        ],
        "unsupported": [],
        "version": "v1"
      }
    },
    "definitionTrace": {
      "fields": [
        {
          "dataType": "INTEGER",
          "fieldType": "property",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "MinimalArtistAliasQueryModel.invoiceLineId",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "MinimalArtistAliasLineModel.invoiceLineId"
            },
            {
              "column": "InvoiceLineId",
              "confidence": "EXACT",
              "from": "MinimalArtistAliasLineModel.invoiceLineId",
              "reasonCode": "TABLE_COLUMN_MODEL_STRUCTURE",
              "relation": "InvoiceLine",
              "to": "InvoiceLine.InvoiceLineId"
            }
          ],
          "queryField": "MinimalArtistAliasQueryModel.invoiceLineId",
          "references": [],
          "tableField": "invoiceLineId",
          "tableModel": "MinimalArtistAliasLineModel"
        },
        {
          "dataType": "DATETIME",
          "fieldType": "property",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "MinimalArtistAliasQueryModel.invoice$invoiceDate",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "unresolved-tm.invoice$id"
            },
            {
              "column": "InvoiceDate",
              "confidence": "EXACT",
              "from": "unresolved-tm.invoice$id",
              "reasonCode": "TABLE_COLUMN_MODEL_STRUCTURE",
              "relation": "Invoice",
              "to": "Invoice.InvoiceDate"
            }
          ],
          "queryField": "MinimalArtistAliasQueryModel.invoice$invoiceDate",
          "references": [],
          "tableField": "invoice$id"
        },
        {
          "dataType": "INTEGER",
          "fieldType": "dimension",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "MinimalArtistAliasQueryModel.albumArtistId",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "unresolved-tm.artist$id"
            },
            {
              "column": "ArtistId",
              "confidence": "EXACT",
              "from": "unresolved-tm.artist$id",
              "reasonCode": "TABLE_COLUMN_MODEL_STRUCTURE",
              "relation": "Album",
              "to": "Album.ArtistId"
            }
          ],
          "queryField": "MinimalArtistAliasQueryModel.albumArtistId",
          "references": [],
          "tableField": "artist$id"
        },
        {
          "dataType": "TEXT",
          "fieldType": "dimension",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "MinimalArtistAliasQueryModel.albumArtistName",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "unresolved-tm.artist$caption"
            },
            {
              "column": "Name",
              "confidence": "EXACT",
              "from": "unresolved-tm.artist$caption",
              "reasonCode": "TABLE_COLUMN_MODEL_STRUCTURE",
              "relation": "Artist",
              "to": "Artist.Name"
            }
          ],
          "queryField": "MinimalArtistAliasQueryModel.albumArtistName",
          "references": [],
          "tableField": "artist$caption"
        },
        {
          "dataType": "INTEGER",
          "fieldType": "dimension",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "MinimalArtistAliasQueryModel.track.album.artist$id",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "unresolved-tm.artist$id"
            },
            {
              "column": "ArtistId",
              "confidence": "EXACT",
              "from": "unresolved-tm.artist$id",
              "reasonCode": "TABLE_COLUMN_MODEL_STRUCTURE",
              "relation": "Album",
              "to": "Album.ArtistId"
            }
          ],
          "queryField": "MinimalArtistAliasQueryModel.track.album.artist$id",
          "references": [],
          "tableField": "artist$id"
        },
        {
          "dataType": "TEXT",
          "fieldType": "dimension",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "MinimalArtistAliasQueryModel.track.album.artist$caption",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "unresolved-tm.artist$caption"
            },
            {
              "column": "Name",
              "confidence": "EXACT",
              "from": "unresolved-tm.artist$caption",
              "reasonCode": "TABLE_COLUMN_MODEL_STRUCTURE",
              "relation": "Artist",
              "to": "Artist.Name"
            }
          ],
          "queryField": "MinimalArtistAliasQueryModel.track.album.artist$caption",
          "references": [],
          "tableField": "artist$caption"
        },
        {
          "dataType": "MONEY",
          "fieldType": "measure",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "MinimalArtistAliasQueryModel.lineAmount",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "MinimalArtistAliasLineModel.lineAmount"
            },
            {
              "confidence": "OPAQUE",
              "from": "MinimalArtistAliasLineModel.lineAmount",
              "reasonCode": "FORMULA_BUILDER_OPAQUE",
              "to": "<opaque-formula-builder>"
            },
            {
              "confidence": "OPAQUE",
              "from": "<opaque-formula-builder>",
              "reasonCode": "FORMULA_BUILDER_SOURCE_OPAQUE",
              "to": "<opaque-formula-source>"
            }
          ],
          "queryField": "MinimalArtistAliasQueryModel.lineAmount",
          "references": [],
          "tableField": "lineAmount",
          "tableModel": "MinimalArtistAliasLineModel"
        }
      ],
      "joins": [
        {
          "confidence": "EXACT",
          "foreignKey": "InvoiceId",
          "fromModel": "MinimalArtistAliasLineModel",
          "joinType": "LEFT",
          "reasonCode": "JOIN_FOREIGN_KEY_MODEL_STRUCTURE"
        },
        {
          "confidence": "EXACT",
          "foreignKey": "TrackId",
          "fromModel": "MinimalArtistAliasLineModel",
          "joinType": "LEFT",
          "reasonCode": "JOIN_FOREIGN_KEY_MODEL_STRUCTURE"
        },
        {
          "confidence": "EXACT",
          "foreignKey": "AlbumId",
          "joinType": "LEFT",
          "reasonCode": "JOIN_FOREIGN_KEY_MODEL_STRUCTURE"
        },
        {
          "confidence": "EXACT",
          "foreignKey": "ArtistId",
          "joinType": "LEFT",
          "reasonCode": "JOIN_FOREIGN_KEY_MODEL_STRUCTURE"
        }
      ],
      "model": {
        "dependencies": [
          {
            "kind": "TABLE",
            "name": "MinimalArtistAliasLineModel"
          }
        ],
        "kind": "QUERY",
        "name": "MinimalArtistAliasQueryModel",
        "namespace": "chinook",
        "revision": "source:65bd5c43-880b-43d9-8b5a-a6b64cb24081:g0:n4",
        "source": "chinook-0129-minimal:练习目录\\lab\\releases\\launcher-0.1.29\\minimal-alias-models\\query\\MinimalArtistAliasQueryModel.qm"
      },
      "queryModel": "MinimalArtistAliasQueryModel"
    },
    "executionTrace": {
      "jdbc": "NOT_EVALUATED",
      "l1Cache": "NOT_EVALUATED",
      "l2Cache": "NOT_EVALUATED",
      "route": "NOT_EVALUATED"
    },
    "limitations": [
      {
        "code": "FORMULA_BUILDER_OPAQUE",
        "confidence": "OPAQUE",
        "message": "An arbitrary formulaDef.builder participated; its source code and undeclared physical lineage were not inspected or exposed."
      },
      {
        "code": "RECOMPILED_NOT_EXECUTED_TRACE",
        "confidence": "EXACT",
        "message": "This evidence was produced by a fresh governed compilation. It is not the historical trace of an earlier execution."
      }
    ],
    "materializationTrace": {
      "decision": "SOURCE_QUERY_RETAINED",
      "definitions": [],
      "reasonCode": "PREAGG_NOT_CONFIGURED",
      "route": "RAW",
      "status": "EVALUATED"
    },
    "schemaVersion": "foggy-semantic-explain/v1",
    "securityTrace": {
      "affectedFields": [],
      "affectsFieldVisibility": false,
      "affectsJoin": false,
      "affectsPreAggregation": false,
      "conditions": [
        {
          "confidence": "EXACT",
          "field": "invoice$invoiceDate",
          "operator": "[)",
          "origin": "USER_SLICE",
          "path": "slice[0]",
          "redactedValue": "***",
          "valueType": "LIST<String>"
        },
        {
          "confidence": "EXACT",
          "field": "albumArtistId",
          "operator": "=",
          "origin": "USER_SLICE",
          "path": "slice[1]",
          "redactedValue": "***",
          "valueType": "Integer"
        }
      ],
      "effect": "ALLOW",
      "policyId": "PUBLIC",
      "policyVersion": "PUBLIC",
      "publicDecision": true,
      "status": "EVALUATED"
    },
    "sqlTrace": {
      "confidence": "OBSERVED",
      "exposed": true,
      "finalPhysicalSql": "select\td3.ArtistId \"albumArtistId\",\td4.Name \"albumArtistName\",\tCOUNT(t1.InvoiceLineId) \"lineCount\",\tSUM(t1.UnitPrice * t1.Quantity) \"totalAmount\"\tfrom InvoiceLine t1\t left join Track d2  on t1.TrackId=d2.TrackId left join Album d3  on d2.AlbumId=d3.AlbumId left join Artist d4  on d3.ArtistId=d4.ArtistId left join Invoice d1  on t1.InvoiceId=d1.InvoiceId where  1=1  and \td1.InvoiceDate >=?  and \td1.InvoiceDate <?  and \td3.ArtistId =? \tgroup by d3.ArtistId,\td4.Name order by d3.ArtistId asc",
      "logicalSql": "select\td3.ArtistId \"albumArtistId\",\td4.Name \"albumArtistName\",\tCOUNT(t1.InvoiceLineId) \"lineCount\",\tSUM(t1.UnitPrice * t1.Quantity) \"totalAmount\"\tfrom InvoiceLine t1\t left join Track d2  on t1.TrackId=d2.TrackId left join Album d3  on d2.AlbumId=d3.AlbumId left join Artist d4  on d3.ArtistId=d4.ArtistId left join Invoice d1  on t1.InvoiceId=d1.InvoiceId where  1=1  and \td1.InvoiceDate >=?  and \td1.InvoiceDate <?  and \td3.ArtistId =? \tgroup by d3.ArtistId,\td4.Name order by d3.ArtistId asc",
      "parameters": [
        {
          "confidence": "OBSERVED",
          "index": 1,
          "origin": "USER_SLICE",
          "redactedValue": "***",
          "valueType": "String"
        },
        {
          "confidence": "OBSERVED",
          "index": 2,
          "origin": "USER_SLICE",
          "redactedValue": "***",
          "valueType": "String"
        },
        {
          "confidence": "OBSERVED",
          "index": 3,
          "origin": "USER_SLICE",
          "redactedValue": "***",
          "valueType": "Integer"
        }
      ],
      "reasonCode": "SQL_CAPTURED_FROM_QUERY_EXECUTION_CONTEXT",
      "sourceOfTruth": "QueryExecutionContext.sql"
    }
  },
  "diagnostics": {
    "attributes": {},
    "warnings": []
  },
  "engine": "java",
  "runtimeApiVersion": "foggy-runtime-api/v1",
  "success": true
}
