>From Ali Alsuliman <[email protected]>: Attention is currently required from: Preetham Poluparthi, Shahrzad Shirazi.
Ali Alsuliman has posted comments on this change by Shahrzad Shirazi. ( https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21005?usp=email ) Change subject: [ASTERIXDB-3718][COMP] Fixing the result of object_put function ...................................................................... Patch Set 5: (2 comments) File asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_put/object_put.8.query.sqlpp: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21005/comment/5ba30740_8f30b318?usp=email : PS5, Line 33: "t4c": object_put({"a": 1, "b": 2}, "d", 3) Add one more just in case (the field to change is in the middle): ``` "t5c": object_put({"a": 1, "b": 2, "c": 7}, "b", 3) ``` File asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordPutEvaluator.java: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21005/comment/e85c2b2a_0c884a8f?usp=email : PS5, Line 47: if (!newFieldFound && !PointableHelper.isEqual(fieldName, newFieldNamePointable, stringBinaryComparator)) { Just an observation: the intention might have been to do the following: ``` if (newFieldFound || !PointableHelper.isEqual(fieldName, newFieldNamePointable, stringBinaryComparator) ``` Basically the idea is once we put the new field, then we don't have to compare the rest of the fields since we can just add them directly. This is of course under the assumption that there cannot be duplicate fields in the record, for example: ``` OBJECT_PUT({"y":1, "x": 222, "x": 333, "z": 9, "a": 1}, "x", 2); ``` In any case, the original implementation before this change was comparing the fields all the time. -- To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21005?usp=email To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: asterixdb Gerrit-Branch: trinity Gerrit-Change-Id: I434142a9b9cd2d1fc941b4e4f4503f8403a734ec Gerrit-Change-Number: 21005 Gerrit-PatchSet: 5 Gerrit-Owner: Shahrzad Shirazi <[email protected]> Gerrit-Reviewer: Ali Alsuliman <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Peeyush Gupta <[email protected]> Gerrit-Reviewer: Preetham Poluparthi <[email protected]> Gerrit-Reviewer: Shahrzad Shirazi <[email protected]> Gerrit-Attention: Shahrzad Shirazi <[email protected]> Gerrit-Attention: Preetham Poluparthi <[email protected]> Gerrit-Comment-Date: Tue, 17 Mar 2026 15:03:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
