@Override
        public LogicalPlan apply(LogicalPlan plan) {
            return plan.transformAllExpressions(e -> {
                if (e instanceof Cast) {
                    Cast cast = (Cast) e;
                    if (cast.dataType() == cast.child().dataType()) {
                        return cast.child();
                    }
                }
                return e;
            });
        }
Removes [[Cast Casts]] that are unnecessary because the input is already the correct type.
indexr-query-opt/src/main/java/io/indexr/query/Optimizer.java