ga4-export-fixer 0.9.0-dev.14 → 0.9.0-dev.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ga4-export-fixer",
3
- "version": "0.9.0-dev.14",
3
+ "version": "0.9.0-dev.16",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -414,10 +414,13 @@ ${excludedEventsSQL}`,
414
414
 
415
415
  const finalColumnOrder = getFinalColumnOrder(eventDataStep, sessionDataStep);
416
416
 
417
- // When the items scaffold is active, override the items column and exclude _item_row_id
418
- // COALESCE handles events without items (not in ecommerce filter) where the LEFT JOIN returns NULL
417
+ // When the items scaffold is active, override the items column and exclude _item_row_id.
418
+ // ifnull(..., []) preserves the empty-array shape for events that have no items_rebuilt
419
+ // match (non-ecommerce events, or ecommerce events with empty items arrays). The empty
420
+ // array literal is type-inferred from items_rebuilt.items, which includes any item-level
421
+ // enrichment columns — so additive enrichments don't cause a struct-schema mismatch.
419
422
  const itemListOverrides = itemListSteps ? {
420
- items: 'coalesce(items_rebuilt.items, event_data.items)',
423
+ items: 'ifnull(items_rebuilt.items, [])',
421
424
  } : {};
422
425
  const itemListExcludedColumns = itemListSteps ? ['_item_row_id'] : [];
423
426