Skip to content

Commit

Permalink
Propagate use common table from target to index
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelewski committed Nov 4, 2024
1 parent 5b94459 commit 69ae084
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions quesma/quesma/config/config_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,9 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
} else {
errAcc = multierror.Append(errAcc, fmt.Errorf("invalid target %s in configuration of index %s", target, indexName))
}
if _, exists := target.properties["useCommonTable"]; exists {
processedConfig.UseCommonTable = true
}
}
}
// fallback to old style, simplified target configuration
Expand Down Expand Up @@ -785,6 +788,9 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
} else {
errAcc = multierror.Append(errAcc, fmt.Errorf("invalid target %s in configuration of index %s", target, indexName))
}
if _, exists := target.properties["useCommonTable"]; exists {
processedConfig.UseCommonTable = true
}
}
}
// fallback to old style, simplified target configuration
Expand Down Expand Up @@ -842,6 +848,9 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
} else {
errAcc = multierror.Append(errAcc, fmt.Errorf("invalid target %s in configuration of index %s", target, indexName))
}
if _, exists := target.properties["useCommonTable"]; exists {
processedConfig.UseCommonTable = true
}
}
}
// fallback to old style, simplified target configuration
Expand Down

0 comments on commit 69ae084

Please sign in to comment.