[
https://issues.apache.org/jira/browse/CALCITE-7627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18111742#comment-18111742
]
Mihai Budiu commented on CALCITE-7627:
--------------------------------------
Can you sketch a minimal implementation which only adds a policy for one type
so we can see the flow end-to-end?
How is the planner rule configured, using the standard Config mechanism? Or you
subclass an existing planner rule?
> Enumerable DML should reject assignments that may lose data
> -----------------------------------------------------------
>
> Key: CALCITE-7627
> URL: https://issues.apache.org/jira/browse/CALCITE-7627
> Project: Calcite
> Issue Type: Bug
> Reporter: zzwqqq
> Assignee: zzwqqq
> Priority: Major
> Labels: pull-request-available
>
> Enumerable DML currently accepts some assignments that may lose data.
> One example is assigning a longer string to a shorter VARCHAR column:
> {code:sql}
> CREATE TABLE dept (deptno INTEGER NOT NULL, name VARCHAR(10));
> INSERT INTO dept
> VALUES (30, 'Engineering');
> {code}
> The Enumerable/server path can insert the value now. With their default
> settings, PostgreSQL, MySQL, and Oracle reject this case:
> https://onecompiler.com/postgresql/44sf3dz68
> https://onecompiler.com/mysql/44sf3efz4
> https://onecompiler.com/oracle/44sf3ewmh
> The assignment should produce a runtime error rather than truncating or
> accepting the value.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)