Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
private static final int MAX_SIZE =
IoTDBDescriptor.getInstance().getConfig().getQueryCacheSizeInMetric();
private static final int DELETE_SIZE = 20;
private static final int FETCH_SIZE = 10000;
private static final String ERROR_PARSING_SQL =
"meet error while parsing SQL to physical plan: {}";
private static final List<SqlArgument> sqlArgumentList = new ArrayList<>(MAX_SIZE);
Expand Down Expand Up @@ -553,6 +554,11 @@ private TSExecuteStatementResp internalExecuteQueryStatement(String statement,
try {
TSExecuteStatementResp resp = getQueryResp(plan, username); // column headers

// In case users forget to set this field in query, use the default value
if (fetchSize == 0) {
fetchSize = FETCH_SIZE;
}

if (plan instanceof ShowTimeSeriesPlan) {
//If the user does not pass the limit, then set limit = fetchSize and haslimit=false,else set haslimit = true
if (((ShowTimeSeriesPlan) plan).getLimit() == 0) {
Expand Down