analyze method
Implementation
Future<void> analyze(String tableName) async {
final table = tables[tableName];
if (table == null) throw Exception('Table "$tableName" not found');
final rows = await table.scan();
final rowMaps = rows.map((r) => r.toJson()).toList();
final ts = StatisticsCollector.collect(tableName, rowMaps);
statsRegistry.update(ts);
await StatsPersistence.save(statsRegistry, '$dir/stats.json', vfs: vfs);
print('[NebulaDB] ANALYZE $tableName: ${ts.rowCount} rows');
}