mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2025-12-16 22:35:11 -06:00
fix: query logic bug (#2631)
This commit is contained in:
@@ -501,11 +501,10 @@ func InsertCutOverOLAPPayloadsIntoTempTable(ctx context.Context, tx DBTX, tableN
|
||||
FROM inputs
|
||||
ORDER BY tenant_id, external_id, inserted_at
|
||||
ON CONFLICT(tenant_id, external_id, inserted_at) DO NOTHING
|
||||
RETURNING *
|
||||
)
|
||||
|
||||
SELECT tenant_id, external_id, inserted_at
|
||||
FROM inserts
|
||||
FROM inputs
|
||||
ORDER BY tenant_id DESC, external_id DESC, inserted_at DESC
|
||||
LIMIT 1
|
||||
`,
|
||||
|
||||
@@ -72,11 +72,10 @@ func InsertCutOverPayloadsIntoTempTable(ctx context.Context, tx DBTX, tableName
|
||||
FROM inputs
|
||||
ORDER BY tenant_id, inserted_at, id, type
|
||||
ON CONFLICT(tenant_id, id, inserted_at, type) DO NOTHING
|
||||
RETURNING *
|
||||
)
|
||||
|
||||
SELECT tenant_id, inserted_at, id, type
|
||||
FROM inserts
|
||||
FROM inputs
|
||||
ORDER BY tenant_id DESC, inserted_at DESC, id DESC, type DESC
|
||||
LIMIT 1
|
||||
`,
|
||||
|
||||
Reference in New Issue
Block a user