/** * Check if this instances does not violate any of the {@link Operator#getTargetPlatforms()} restrictions. */ private boolean meetsPlatformRestrictions(SubplanMatch match) { // Short-cut: This transformation is not introducing some platform dependency. if (this.getTargetPlatforms().isEmpty()) { return true; } // Short-cut: The matched operators do not require specific platforms. if (!match.getTargetPlatforms().isPresent()) { return true; } // Otherwise check if return match.getTargetPlatforms().get().containsAll(this.getTargetPlatforms()); }