lvshaokang commented on code in PR #19571:
URL: https://github.com/apache/doris/pull/19571#discussion_r1201650492
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/UnifiedLoadStmt.java:
##########
@@ -55,6 +42,31 @@ public void init() {
proxyStmt.setUserInfo(getUserInfo());
}
+ public static UnifiedLoadStmt buildMysqlLoadStmt(DataDescription
dataDescription, Map<String, String> properties,
+ String comment) {
+ StatementBase proxyStmt;
+ final ConnectContext connectContext = ConnectContext.get();
+ if (connectContext != null &&
connectContext.getSessionVariable().isEnableUnifiedLoad()) {
+ proxyStmt = new MysqlLoadStmt(dataDescription, properties,
comment);
+ } else {
+ proxyStmt = new LoadStmt(dataDescription, properties, comment);
+ }
+ return new UnifiedLoadStmt(proxyStmt);
+ }
+
+ public static UnifiedLoadStmt buildBrokerLoadStmt(LabelName label,
List<DataDescription> dataDescriptions,
+ BrokerDesc brokerDesc,
+ Map<String, String>
properties, String comment) {
+ StatementBase proxyStmt;
+ final ConnectContext connectContext = ConnectContext.get();
+ if (connectContext != null &&
connectContext.getSessionVariable().isEnableUnifiedLoad()) {
+ proxyStmt = new BrokerLoadStmt(label, dataDescriptions,
brokerDesc, properties, comment);
+ } else {
+ proxyStmt = new LoadStmt(label, dataDescriptions, brokerDesc,
properties, comment);
+ }
+ return new UnifiedLoadStmt(proxyStmt);
+ }
+
Review Comment:
done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]