morningman commented on code in PR #41386:
URL: https://github.com/apache/doris/pull/41386#discussion_r1778863919


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/maxcompute/MaxComputeExternalCatalog.java:
##########
@@ -67,11 +75,46 @@ public MaxComputeExternalCatalog(long catalogId, String 
name, String resource, M
         catalogProperty = new CatalogProperty(resource, props);
     }
 
+    //Compatible with existing catalogs in previous versions.
+    protected void generatorEndpoint() {
+        Map<String, String> props = catalogProperty.getProperties();
+
+        if (props.containsKey(MCProperties.ENDPOINT)) {
+            endpoint = props.get(MCProperties.ENDPOINT);
+            return;
+        } else if (props.containsKey(MCProperties.TUNNEL_SDK_ENDPOINT)) {

Review Comment:
   Add some example in comment to explain this conversion.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/maxcompute/MaxComputeExternalCatalog.java:
##########
@@ -43,13 +48,16 @@
 import java.util.stream.Collectors;
 
 public class MaxComputeExternalCatalog extends ExternalCatalog {
+    private static final String endpointTemplate = 
"http://service.{}.maxcompute.aliyun-inc.com/api";;

Review Comment:
   Add aliyun doc link about this endpoint.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/maxcompute/source/MaxComputeScanNode.java:
##########
@@ -363,11 +363,12 @@ private String convertLiteralToOdpsValues(OdpsType 
odpsType, Expr expr) throws A
                 ScalarType dstType = ScalarType.createDateV2Type();
                 return  " \"" + dateLiteral.getStringValue(dstType) + "\" ";
             }
-            case DATETIME: {
-                DateLiteral dateLiteral = (DateLiteral) literalExpr;
-                ScalarType dstType = ScalarType.createDatetimeV2Type(3);
-                return  " \"" + dateLiteral.getStringValue(dstType) + "\" ";
-            }
+            // case DATETIME: {

Review Comment:
   why comment out?



##########
fe/be-java-extensions/max-compute-scanner/src/main/java/org/apache/doris/maxcompute/MaxComputeJniScanner.java:
##########
@@ -117,6 +118,14 @@ public MaxComputeJniScanner(int batchSize, Map<String, 
String> params) {
         project = Objects.requireNonNull(params.get(PROJECT), "required 
property '" + PROJECT + "'.");
         table = Objects.requireNonNull(params.get(TABLE), "required property 
'" + TABLE + "'.");
         sessionId = Objects.requireNonNull(params.get(SESSION_ID), "required 
property '" + SESSION_ID + "'.");
+        String timeZoneName = Objects.requireNonNull(params.get(TIME_ZONE), 
"required property '" + TIME_ZONE + "'.");
+        try {
+            timeZone = ZoneId.of(timeZoneName);
+        } catch (Exception e) {
+            LOG.info(e.getMessage());
+            LOG.info("set timeZoneName = " + timeZoneName + "fail, use 
systemDefault.");

Review Comment:
   use LOG.warn, and use one line.



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to