thomasmueller commented on code in PR #1094: URL: https://github.com/apache/jackrabbit-oak/pull/1094#discussion_r1315792134
########## oak-core/src/main/java/org/apache/jackrabbit/oak/query/UnionQueryImpl.java: ########## @@ -195,7 +195,13 @@ public long getSize(SizePrecision precision, long max) { long total = QueryImpl.saturatedAdd(a, b); return Math.min(localLimit, total); } - + + @Override + public boolean isInsecureResultSize() { + // assumes that the same queryOptions are passed to both left and right queries in setQueryOptions() + return right.isInsecureResultSize(); Review Comment: Why not use left.isInsecureResultSize() || right.isInsecureResultSize(): that way the implementation can be changed later. ########## oak-core/src/main/java/org/apache/jackrabbit/oak/query/xpath/Statement.java: ########## @@ -382,6 +382,18 @@ private static void appendQueryOptions(StringBuilder buff, QueryOptions queryOpt SQL2Parser::escapeStringLiteral)); optionValues.add("prefetch (" + list + ")"); } + if (queryOptions.hasInsecureOptions()) { + List<String> insecureOpts = new ArrayList<>(); + insecureOpts.add("insecure"); + if (queryOptions.insecureResultSize) { + insecureOpts.add("resultsize"); Review Comment: I don't like "resultsize" as it's two words concatenated... Options are: * "resultsize": can be hard to read * "result_size": looks a bit ugly * "resultSize": the parser is not case sensitive so it might work * "result size": this approach is used for "index tag" already I would prefer "result size" (two words). -- 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: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org