Calcite does not support implicit type cast yet, so it is strict for type 
compare, e.g. two decimals with different precision or scale will be considered 
different type. For timestamp(3) and varchar, they are definitely different 
data types.

You can make explicit type cast before inserting into target table.

Best,
Danny Chan
在 2019年3月29日 +0800 AM9:44,勾王敏浩 <[email protected]>,写道:
> Hi,
> My Name is Wangminhao Gou,I hava used calcite to operate several relational 
> databases including PG,however,when I want to insert timestamp value,there is 
> an exception.The information is like this:
> org.apache.calcite.runtime.CalciteContextException: From line 1, column 47 to 
> line 1, column 60: Cannot assign to target field 'plt_createtime' of type 
> TIMESTAMP(3) from source field 'EXPR$1' of type CHAR(23)
> Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Cannot 
> assign to target field 'plt_createtime' of type TIMESTAMP(3) from source 
> field 'EXPR$1' of type CHAR(23)
> however when I used the same SQL statement in the navicat towards the PG,it 
> succeeds.
> What should I do then?Thank you.
>
>
> Sincerely,
> Wangminhao Gou
>

Reply via email to