| 274 | |
| 275 | |
| 276 | class FeatureNameCollisionError(FeastError): |
| 277 | def __init__(self, feature_refs_collisions: List[str], full_feature_names: bool): |
| 278 | if full_feature_names: |
| 279 | collisions = [ref.replace(":", "__") for ref in feature_refs_collisions] |
| 280 | error_message = ( |
| 281 | "To resolve this collision, please ensure that the feature views or their own features " |
| 282 | "have different names. If you're intentionally joining the same feature view twice on " |
| 283 | "different sets of entities, please rename one of the feature views with '.with_name'." |
| 284 | ) |
| 285 | else: |
| 286 | collisions = [ref.split(":")[1] for ref in feature_refs_collisions] |
| 287 | error_message = ( |
| 288 | "To resolve this collision, either use the full feature name by setting " |
| 289 | "'full_feature_names=True', or ensure that the features in question have different names." |
| 290 | ) |
| 291 | |
| 292 | feature_names = ", ".join(set(collisions)) |
| 293 | super().__init__( |
| 294 | f"Duplicate features named {feature_names} found.\n{error_message}" |
| 295 | ) |
| 296 | |
| 297 | |
| 298 | class SpecifiedFeaturesNotPresentError(FeastError): |
no outgoing calls
no test coverage detected