Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client
Submodule client updated 166 files
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

import com.oceanbase.odc.common.lang.Holder;
import com.oceanbase.odc.common.util.StringUtils;
Expand Down Expand Up @@ -633,11 +632,11 @@ private boolean equalsIgnoreCase(char[] src, OrderChar[] dest, int begin, int co
* 当前SQL是否是以分隔符开头
*/
private boolean isPrefix(OrderChar[] line, int pos, String delim) {
boolean res = IntStream.range(pos, pos + delim.length())
.mapToObj(i -> line[i].getCh())
.collect(StringBuilder::new, StringBuilder::append, StringBuilder::append)
.toString().startsWith(delim);

StringBuilder builder = new StringBuilder();
for (int i = 0; i < line.length - pos; i++) {
builder.append(line[pos + i].getCh());
}
boolean res = builder.toString().startsWith(delim);
if (!res || !"/".equals(delim) || line.length <= 1) {
return res;
}
Expand Down