I think we should pass a correct condition (`leftKeys` and `rightKeys`) into `CartesianProductExec` instead of removing the hint:   https://github.com/apache/spark/blob/ac6406e7571027ba61193452d7a54f7895d2cbdc/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala#L202