> On Apr 29, 2020, at 21:31, Danny Chan wrote:
>
> Or try SQL, it has the implicit type coercion ~
That’s true. SQL is a great way to build relational algebra expressions. Highly
recommended.
Julian
Or try SQL, it has the implicit type coercion ~
Best,
Danny Chan
在 2020年4月28日 +0800 AM4:36,Julian Hyde ,写道:
> Anjali,
>
> If you’re using RelBuilder to create the union, or creating the union
> manually, it is your responsibility to make sure that the input RelNodes have
> compatible types.
>
>
Anjali,
If you’re using RelBuilder to create the union, or creating the union manually,
it is your responsibility to make sure that the input RelNodes have compatible
types.
RelDataTypeFactory.leastRestrictive(List) may be useful.
Julian
> On Apr 27, 2020, at 1:32 PM, Rui Wang wrote:
>
>
Did a quick test by running a SQL query that has UNION on two different
types. Validator gave a correct error message (not NPE) to remind type
mismatch.
Agreed with Jin, could you provide more context/example how you reach the
NPE? (It could be better if you can file a Jira with your context).
Hi, Anjali ~
Are you doing the UNION by Sql ? If so, can you give the Sql content ?
Are you doing the UNION on RelNodes ?, If so, you need to do type CAST.
Jin
Anjali Shrishrimal 于2020年4月27日周一
下午4:25写道:
> Hi,
>
> While doing union of 2 RelNodes with different types, I am getting NPE. (I
> am
Hi,
While doing union of 2 RelNodes with different types, I am getting NPE. (I am
using calcite 1.21.0)
java.lang.NullPointerException: at index 0
at
com.google.common.collect.ObjectArrays.checkElementNotNull(ObjectArrays.java:225)
at