Change estimatedByteSize from int to long for limit clause.

regarding the check of overflow, use assert instead of thow exception, since when change to long, it is really impossible to overflow. Due to the fact that in limit clause, limit is still using int.