[
https://issues.apache.org/jira/browse/CALCITE-5041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17655722#comment-17655722
]
Tuomas Kiviaho commented on CALCITE-5041:
-----------------------------------------
I encountered to this issue with MERGE as well... only after figuring out via
CALCITE-1534 that CustomColumnResolvingTable is always needed even for simple
identifiers (CALCITE-2906). To me it seems that the plan at least is ok.
I can see by looking at the {{EnumerableDefaults}} {{into}} and {{remove}}
implementations that {{update}} would be a bit more complex to implement since
the already implemented ones do not need to know basically anything about the
entities. These rudimentary implementations might also be the reason why
{{ModifiableTable}} has been marked as inefficient and experimental.
One could though write such by introducing a rule that overtakes precedence to
{{EnumerableTableModifyRule}}. JDBC for instance doesn't seem to utilize the
{{ModifiableTable.getModifiableCollection}} at all.
> SQL DML Update statement
> ------------------------
>
> Key: CALCITE-5041
> URL: https://issues.apache.org/jira/browse/CALCITE-5041
> Project: Calcite
> Issue Type: Bug
> Components: jdbc-adapter
> Reporter: Tang
> Priority: Trivial
>
> I want to add a custom table in calcite, support SQL DML, when I try to
> support the update statement, there is an error here, reminding me that the
> update operation is not supported in the EnumerableTableModify function
> [the exception is in
> |https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableTableModify.java#L139]
> [Historical commit information is
> here|https://issues.apache.org/jira/browse/CALCITE-1527]
> At present, INSERT, SELECT, DELETE have all been implemented
> I hope I can get some actionable advice, thanks
--
This message was sent by Atlassian Jira
(v8.20.10#820010)