Provide an int64 constructor for Expr and Integer

Currently, the immediate value constructor of class Expr and Integer accept only int32 argument. This is error-prone because C++ will automatically downcast to int32 if you pass in an int64. Simply add an int64 constructor will solve this problem.

If someone think it necessary, I can make a Pull Request.

This was a legacy issue, as by default the int constant values are still casted to dtype=int32 which might be good for efficiency reasons. We eventually want to fix this.

The best way to fix this is to allow the data types to become int64, but then run an expression bound detection algorithm to move dtype down to int32 if possible. It would be great if someone can take a step toward this, then we should be able to move most things to int64 default without worrying about perf regression.

1 Like