{
  "data": {
    "basis": "RECOMPILED",
    "compilationTrace": {
      "events": [
        {
          "confidence": "EXACT",
          "decision": "NORMALIZED",
          "details": {
            "requestedFieldCount": 6
          },
          "event": "SEMANTIC_DSL_NORMALIZED",
          "observedAt": "2026-10-20T05:18:51.153461600Z",
          "reasonCode": "DSL_NORMALIZED",
          "sequence": 1,
          "stage": "NORMALIZATION",
          "status": "EVALUATED"
        },
        {
          "confidence": "EXACT",
          "decision": "RAW",
          "details": {},
          "event": "PRE_AGGREGATION_ROUTING",
          "observedAt": "2026-10-20T05:18:51.156971100Z",
          "reasonCode": "PREAGG_NOT_CONFIGURED",
          "sequence": 2,
          "stage": "MATERIALIZATION",
          "status": "EVALUATED"
        },
        {
          "confidence": "EXACT",
          "decision": "RAW",
          "details": {},
          "event": "PRE_AGGREGATION_ROUTING",
          "observedAt": "2026-10-20T05:18:51.158045300Z",
          "reasonCode": "PREAGG_NOT_CONFIGURED",
          "sequence": 3,
          "stage": "MATERIALIZATION",
          "status": "EVALUATED"
        },
        {
          "confidence": "OBSERVED",
          "decision": "COMPOSED_SQL",
          "details": {
            "parameterCount": 4
          },
          "event": "TIME_WINDOW_PLAN_COMPILED",
          "observedAt": "2026-10-20T05:18:51.158045300Z",
          "reasonCode": "TIME_WINDOW_COMPOSE_PLAN_COMPILED",
          "sequence": 4,
          "stage": "TIME_WINDOW",
          "status": "EVALUATED"
        }
      ],
      "fieldResolution": [
        {
          "confidence": "EXACT",
          "requested": "invoiceDate$year",
          "resolved": "invoiceDate$year",
          "tableField": "invoiceDate$id",
          "tableModel": "ChinookInvoiceTimeModel"
        },
        {
          "confidence": "EXACT",
          "requested": "invoiceDate$month",
          "resolved": "invoiceDate$month",
          "tableField": "invoiceDate$id",
          "tableModel": "ChinookInvoiceTimeModel"
        },
        {
          "confidence": "EXACT",
          "requested": "invoiceAmount",
          "resolved": "invoiceAmount",
          "tableField": "invoiceAmount",
          "tableModel": "ChinookInvoiceTimeModel"
        },
        {
          "confidence": "OBSERVED",
          "requested": "invoiceAmount__prior",
          "resolved": "invoiceAmount__prior"
        },
        {
          "confidence": "OBSERVED",
          "requested": "invoiceAmount__diff",
          "resolved": "invoiceAmount__diff"
        },
        {
          "confidence": "OBSERVED",
          "requested": "invoiceAmount__ratio",
          "resolved": "invoiceAmount__ratio"
        }
      ],
      "normalizedConditions": [],
      "normalizedDsl": {
        "autoFixDimCaption": false,
        "autoGroupBy": true,
        "columns": [
          "invoiceDate$year",
          "invoiceDate$month",
          "invoiceAmount",
          "invoiceAmount__prior",
          "invoiceAmount__diff",
          "invoiceAmount__ratio"
        ],
        "distinct": false,
        "groupBy": [
          {
            "agg": "null",
            "field": "invoiceDate$year"
          },
          {
            "agg": "null",
            "field": "invoiceDate$month"
          }
        ],
        "optimizeAggSqlEnabled": true,
        "orderBy": [
          {
            "dir": "asc",
            "field": "invoiceDate$year",
            "nullFirst": false,
            "nullLast": false
          },
          {
            "dir": "asc",
            "field": "invoiceDate$month",
            "nullFirst": false,
            "nullLast": false
          }
        ],
        "queryModel": "ChinookInvoiceTimeQueryModel",
        "returnTotal": false,
        "strictColumns": true,
        "withSubtotals": false
      },
      "originalDsl": {
        "captionMatchMode": "EXACT",
        "columns": [
          "invoiceDate$year",
          "invoiceDate$month",
          "invoiceAmount",
          "invoiceAmount__prior",
          "invoiceAmount__diff",
          "invoiceAmount__ratio"
        ],
        "distinct": false,
        "groupBy": [
          {
            "field": "invoiceDate$year"
          },
          {
            "field": "invoiceDate$month"
          }
        ],
        "limit": 100,
        "mismatchHandleStrategy": "ABORT",
        "orderBy": [
          {
            "dir": "asc",
            "field": "invoiceDate$year",
            "nullFirst": false,
            "nullLast": false
          },
          {
            "dir": "asc",
            "field": "invoiceDate$month",
            "nullFirst": false,
            "nullLast": false
          }
        ],
        "pivotMode": false,
        "returnTotal": false,
        "start": 0,
        "timeWindow": {
          "comparison": "***",
          "field": "***",
          "grain": "***",
          "range": "***",
          "targetMetrics": [
            "***"
          ],
          "value": [
            "***",
            "***"
          ]
        },
        "withSubtotals": false
      }
    },
    "definitionTrace": {
      "fields": [
        {
          "dataType": "INTEGER",
          "fieldType": "property",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeQueryModel.invoiceId",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "ChinookInvoiceTimeModel.invoiceId"
            },
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeModel.invoiceId",
              "reasonCode": "PHYSICAL_NAME_REDACTED",
              "to": "<physical-source-redacted>"
            }
          ],
          "queryField": "ChinookInvoiceTimeQueryModel.invoiceId",
          "references": [],
          "tableField": "invoiceId",
          "tableModel": "ChinookInvoiceTimeModel"
        },
        {
          "dataType": "DAY",
          "fieldType": "dimension",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeQueryModel.invoiceDate$id",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "ChinookInvoiceTimeModel.invoiceDate$id"
            },
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeModel.invoiceDate$id",
              "reasonCode": "PHYSICAL_NAME_REDACTED",
              "to": "<physical-source-redacted>"
            }
          ],
          "queryField": "ChinookInvoiceTimeQueryModel.invoiceDate$id",
          "references": [],
          "tableField": "invoiceDate$id",
          "tableModel": "ChinookInvoiceTimeModel"
        },
        {
          "dataType": "DAY",
          "fieldType": "dimension",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeQueryModel.invoiceDate$caption",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "ChinookInvoiceTimeModel.invoiceDate$caption"
            },
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeModel.invoiceDate$caption",
              "reasonCode": "PHYSICAL_NAME_REDACTED",
              "to": "<physical-source-redacted>"
            }
          ],
          "queryField": "ChinookInvoiceTimeQueryModel.invoiceDate$caption",
          "references": [],
          "tableField": "invoiceDate$caption",
          "tableModel": "ChinookInvoiceTimeModel"
        },
        {
          "dataType": "DAY",
          "fieldType": "dimension",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeQueryModel.invoiceDate",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "ChinookInvoiceTimeModel.invoiceDate$caption"
            },
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeModel.invoiceDate$caption",
              "reasonCode": "PHYSICAL_NAME_REDACTED",
              "to": "<physical-source-redacted>"
            }
          ],
          "queryField": "ChinookInvoiceTimeQueryModel.invoiceDate",
          "references": [],
          "tableField": "invoiceDate$caption",
          "tableModel": "ChinookInvoiceTimeModel"
        },
        {
          "dataType": "INTEGER",
          "fieldType": "property",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeQueryModel.invoiceDate$year",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "ChinookInvoiceTimeModel.invoiceDate$id"
            },
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeModel.invoiceDate$id",
              "reasonCode": "PHYSICAL_NAME_REDACTED",
              "to": "<physical-source-redacted>"
            }
          ],
          "queryField": "ChinookInvoiceTimeQueryModel.invoiceDate$year",
          "references": [],
          "tableField": "invoiceDate$id",
          "tableModel": "ChinookInvoiceTimeModel"
        },
        {
          "dataType": "INTEGER",
          "fieldType": "property",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeQueryModel.invoiceDate$month",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "ChinookInvoiceTimeModel.invoiceDate$id"
            },
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeModel.invoiceDate$id",
              "reasonCode": "PHYSICAL_NAME_REDACTED",
              "to": "<physical-source-redacted>"
            }
          ],
          "queryField": "ChinookInvoiceTimeQueryModel.invoiceDate$month",
          "references": [],
          "tableField": "invoiceDate$id",
          "tableModel": "ChinookInvoiceTimeModel"
        },
        {
          "dataType": "STRING",
          "fieldType": "property",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeQueryModel.invoiceDate$yearMonth",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "ChinookInvoiceTimeModel.invoiceDate$id"
            },
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeModel.invoiceDate$id",
              "reasonCode": "PHYSICAL_NAME_REDACTED",
              "to": "<physical-source-redacted>"
            }
          ],
          "queryField": "ChinookInvoiceTimeQueryModel.invoiceDate$yearMonth",
          "references": [],
          "tableField": "invoiceDate$id",
          "tableModel": "ChinookInvoiceTimeModel"
        },
        {
          "aggregationFormula": "SUM(Total)",
          "dataType": "MONEY",
          "fieldType": "measure",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeQueryModel.invoiceAmount",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "ChinookInvoiceTimeModel.invoiceAmount"
            },
            {
              "confidence": "EXACT",
              "expression": "SUM(Total)",
              "from": "ChinookInvoiceTimeModel.invoiceAmount",
              "reasonCode": "AGGREGATION_MODEL_STRUCTURE",
              "to": "SUM(Total)"
            },
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeModel.invoiceAmount",
              "reasonCode": "PHYSICAL_NAME_REDACTED",
              "to": "<physical-source-redacted>"
            }
          ],
          "queryField": "ChinookInvoiceTimeQueryModel.invoiceAmount",
          "references": [],
          "tableField": "invoiceAmount",
          "tableModel": "ChinookInvoiceTimeModel"
        },
        {
          "aggregationFormula": "COUNT(InvoiceId)",
          "dataType": "INTEGER",
          "fieldType": "measure",
          "lineage": [
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeQueryModel.invoiceCount",
              "reasonCode": "QM_TO_TM_MODEL_STRUCTURE",
              "to": "ChinookInvoiceTimeModel.invoiceCount"
            },
            {
              "confidence": "EXACT",
              "expression": "COUNT(InvoiceId)",
              "from": "ChinookInvoiceTimeModel.invoiceCount",
              "reasonCode": "AGGREGATION_MODEL_STRUCTURE",
              "to": "COUNT(InvoiceId)"
            },
            {
              "confidence": "EXACT",
              "from": "ChinookInvoiceTimeModel.invoiceCount",
              "reasonCode": "PHYSICAL_NAME_REDACTED",
              "to": "<physical-source-redacted>"
            }
          ],
          "queryField": "ChinookInvoiceTimeQueryModel.invoiceCount",
          "references": [],
          "tableField": "invoiceCount",
          "tableModel": "ChinookInvoiceTimeModel"
        }
      ],
      "joins": [],
      "model": {
        "dependencies": [
          {
            "kind": "TABLE",
            "name": "ChinookInvoiceTimeModel"
          }
        ],
        "kind": "QUERY",
        "name": "ChinookInvoiceTimeQueryModel",
        "namespace": "chinook",
        "revision": "source:1ce0e063-902b-4150-ab27-d627a42e531b:g0:n1",
        "source": "chinook-teaching:练习目录\\lab\\models\\query\\ChinookInvoiceTimeQueryModel.qm"
      },
      "queryModel": "ChinookInvoiceTimeQueryModel"
    },
    "executionTrace": {
      "jdbc": "NOT_EVALUATED",
      "l1Cache": "NOT_EVALUATED",
      "l2Cache": "NOT_EVALUATED",
      "route": "NOT_EVALUATED"
    },
    "limitations": [
      {
        "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."
      },
      {
        "code": "PHYSICAL_SQL_REDACTED",
        "confidence": "EXACT",
        "message": "Physical SQL was withheld because includePhysicalNames is false; Foggy does not guess at safe SQL token redaction."
      },
      {
        "code": "PARAMETER_ORIGIN_PARTIALLY_OPAQUE",
        "confidence": "OPAQUE",
        "message": "Generated parameter cardinality could not be correlated one-to-one with normalized conditions; parameter origins were not guessed."
      }
    ],
    "materializationTrace": {
      "decision": "NOT_EVALUATED",
      "definitions": [],
      "reasonCode": "PREAGG_NOT_EVALUATED_FOR_TIME_WINDOW_COMPOSE",
      "route": "NOT_EVALUATED",
      "status": "NOT_EVALUATED"
    },
    "schemaVersion": "foggy-semantic-explain/v1",
    "securityTrace": {
      "affectedFields": [],
      "affectsFieldVisibility": false,
      "affectsJoin": false,
      "affectsPreAggregation": false,
      "conditions": [],
      "effect": "ALLOW",
      "policyId": "PUBLIC",
      "policyVersion": "PUBLIC",
      "publicDecision": true,
      "status": "EVALUATED"
    },
    "sqlTrace": {
      "confidence": "OBSERVED",
      "exposed": false,
      "parameters": [
        {
          "confidence": "OBSERVED",
          "index": 1,
          "origin": "UNKNOWN",
          "redactedValue": "***",
          "valueType": "String"
        },
        {
          "confidence": "OBSERVED",
          "index": 2,
          "origin": "UNKNOWN",
          "redactedValue": "***",
          "valueType": "String"
        },
        {
          "confidence": "OBSERVED",
          "index": 3,
          "origin": "UNKNOWN",
          "redactedValue": "***",
          "valueType": "String"
        },
        {
          "confidence": "OBSERVED",
          "index": 4,
          "origin": "UNKNOWN",
          "redactedValue": "***",
          "valueType": "String"
        }
      ],
      "reasonCode": "PHYSICAL_NAMES_NOT_EXPOSED",
      "sourceOfTruth": "ComposeSqlCompiler.output"
    }
  },
  "diagnostics": {
    "attributes": {},
    "warnings": []
  },
  "engine": "java",
  "runtimeApiVersion": "foggy-runtime-api/v1",
  "success": true
}
