imay commented on a change in pull request #309: Optimize quota unit
URL: https://github.com/apache/incubator-doris/pull/309#discussion_r233365855
##########
File path:
fe/src/main/java/org/apache/doris/analysis/AlterDatabaseQuotaStmt.java
##########
@@ -26,15 +26,35 @@
import org.apache.doris.mysql.privilege.PrivPredicate;
import org.apache.doris.qe.ConnectContext;
+import java.util.HashMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
import com.google.common.base.Strings;
public class AlterDatabaseQuotaStmt extends DdlStmt {
private String dbName;
+ private String quotaExpression;
private long quota;
+ private String unit = "B";
+ private HashMap<String, Long> validUnitMultiplier = new HashMap<String,
Long>();
Review comment:
You can use a static immutable map to avoid new a map for every statement
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]