feat: add sql analysis batch port

This commit is contained in:
Andrey Avtomonov 2026-05-11 17:03:22 +02:00
parent ffbbaf417a
commit f4021da969
10 changed files with 216 additions and 0 deletions

View file

@ -26,6 +26,9 @@ const sqlAnalysis: SqlAnalysisPort = {
literalSlots: [{ position: 1, type: 'string', exampleValue: 'paid' }],
};
},
async analyzeBatch() {
return new Map();
},
};
const reader: HistoricSqlQueryHistoryReader = {

View file

@ -83,6 +83,9 @@ function fixtureSqlAnalysis(fixture: GoldenFixture): SqlAnalysisPort {
}
return result;
},
async analyzeBatch() {
return new Map();
},
};
}

View file

@ -89,6 +89,9 @@ const sqlAnalysis: SqlAnalysisPort = {
literalSlots: [],
};
},
async analyzeBatch() {
return new Map();
},
};
function postgresPullConfig(maxTemplatesPerRun = 5000) {

View file

@ -51,6 +51,9 @@ const fakeSqlAnalysis: SqlAnalysisPort = {
literalSlots: [{ position: 1, type: 'string', exampleValue: 'complete' }],
};
},
async analyzeBatch() {
return new Map();
},
};
const categoricalSqlAnalysis: SqlAnalysisPort = {
@ -63,6 +66,9 @@ const categoricalSqlAnalysis: SqlAnalysisPort = {
literalSlots: [{ position: 1, type: 'string', exampleValue: status }],
};
},
async analyzeBatch() {
return new Map();
},
};
function categoricalRows(): HistoricSqlRawQueryRow[] {
@ -146,6 +152,9 @@ const diverseSqlAnalysis: SqlAnalysisPort = {
literalSlots: [{ position: 1, type: 'string', exampleValue: value }],
};
},
async analyzeBatch() {
return new Map();
},
};
const classificationMatrixSqlAnalysis: SqlAnalysisPort = {
@ -177,6 +186,9 @@ const classificationMatrixSqlAnalysis: SqlAnalysisPort = {
],
};
},
async analyzeBatch() {
return new Map();
},
};
function classificationMatrixRows(): HistoricSqlRawQueryRow[] {
@ -699,6 +711,9 @@ describe('stageHistoricSqlTemplates', () => {
literalSlots: [],
};
},
async analyzeBatch() {
return new Map();
},
};
await stageHistoricSqlTemplates({
@ -775,6 +790,9 @@ describe('stageHistoricSqlTemplates', () => {
literalSlots: [{ position: 1, type: 'string', exampleValue: 'analyst@example.com' }],
};
},
async analyzeBatch() {
return new Map();
},
},
pullConfig: {
dialect: 'snowflake',

View file

@ -92,6 +92,9 @@ describe('local ingest adapters', () => {
literalSlots: [],
};
},
async analyzeBatch() {
return new Map();
},
};
const adapters = createDefaultLocalIngestAdapters(project, {
historicSql: {
@ -121,6 +124,9 @@ describe('local ingest adapters', () => {
literalSlots: [],
};
},
async analyzeBatch() {
return new Map();
},
},
postgresQueryClient: {
async executeQuery() {
@ -166,6 +172,9 @@ describe('local ingest adapters', () => {
literalSlots: [],
};
},
async analyzeBatch() {
return new Map();
},
},
postgresQueryClient: {
async executeQuery() {