feat(adapter): add passthrough adapter for unchanged vectors

This commit is contained in:
2026-04-11 20:57:44 +02:00
parent 5c070e441e
commit c5608bf5cd
4 changed files with 57 additions and 32 deletions

View File

@@ -95,6 +95,9 @@ func openWriter(path string) (io.Writer, error) {
// buildAdapter constructs the Adapter from the loaded config.
func buildAdapter(cfg *config.Config) (adapter.Adapter, error) {
ac := cfg.Adapter
if ac.SourceDim == 0 && ac.TargetDim == 0 {
return adapter.NewPassthrough(), nil
}
switch ac.Type {
case "truncate":
tm, pm, err := parseTruncateModes(ac.TruncateMode, ac.PadMode)