zhannngchen commented on code in PR #21597:
URL: https://github.com/apache/doris/pull/21597#discussion_r1324084047
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/NativeInsertStmt.java:
##########
@@ -1074,4 +1081,58 @@ public int getBaseSchemaVersion() {
public ByteString getRangeBytes() {
return rangeBytes;
}
+
+ public void setIsFromDeleteOrUpdateStmt(boolean isFromDeleteOrUpdateStmt) {
+ this.isFromDeleteOrUpdateStmt = isFromDeleteOrUpdateStmt;
+ }
+
+ private void trySetPartialUpdate() throws UserException {
+ if (isFromDeleteOrUpdateStmt || isPartialUpdate || !(targetTable
instanceof OlapTable)) {
+ return;
+ }
+ OlapTable olapTable = (OlapTable) targetTable;
+ if (!olapTable.getEnableUniqueKeyMergeOnWrite()) {
+ return;
+ }
+ int count = 0;
+ for (Column col : olapTable.getFullSchema()) {
+ boolean exists = false;
+ for (Column insertCol : targetColumns) {
+ if (insertCol.getName() != null &&
insertCol.getName().equals(col.getName())) {
+ if (!col.isVisible()) {
Review Comment:
should not fallback to row upsert in such case
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]