TaoZex commented on code in PR #3640:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3640#discussion_r1038920513


##########
docs/en/connector-v2/source/Maxcompute.md:
##########
@@ -0,0 +1,81 @@
+# Maxcompute
+
+> Maxcompute source connector
+
+## Description
+
+Used to read data from Maxcompute.
+
+## Key features
+
+- [x] [batch](../../concept/connector-v2-features.md)
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [schema projection](../../concept/connector-v2-features.md)
+- [x] [parallelism](../../concept/connector-v2-features.md)
+- [ ] [support user-defined split](../../concept/connector-v2-features.md)
+
+## Options
+
+| name                    | type   | required  | default value |
+|-------------------------|--------|-----------|---------------|
+| accessId                | string | yes       | -             |
+| accesskey               | string | yes       | -             |
+| endpoint                | string | yes       | -             |
+| project                 | string | yes       | -             |
+| result_table_name       | string | yes       | -             |
+| partition_spec          | string | no        | -             |
+| split_row               | int    | no        | 10000         |
+
+### accessId [string]
+
+`accessId` Your Maxcompute accessId which cloud be access from Alibaba Cloud.
+
+### accesskey [string]
+
+`accesskey` Your Maxcompute accessKey which cloud be access from Alibaba Cloud.
+
+### endpoint [string]
+
+`endpoint` Your Maxcompute endpoint start with http.
+
+### project [string]
+
+`project` Your Maxcompute project which is created in Alibaba Cloud.
+
+### result_table_name [string]
+
+`result_table_name` Target Maxcompute table name eg: fake.
+
+### partition_spec [string]
+
+`partition_spec` This spec of Maxcompute partition table eg:ds='20220101'.
+
+### split_row [int]
+
+`split_row` Number of rows per split, default: 10000.
+
+### common options 
+
+Source plugin common parameters, please refer to [Source Common 
Options](common-options.md) for details.
+
+## Examples
+
+```hocon
+source {
+  MaxcomputeSource {
+    accessId="<your access id>"
+    accesskey="<your access Key>"
+    endpoint="<http://service.odps.aliyun.com/api>"
+    project="<your project>"
+    result_table_name="<your table name>"
+    #partition_spec="<your partition spec>"
+    #split_row = 10000
+  }
+}
+```
+
+## Changelog
+
+### 2.1.3-beta 2022-12-05

Review Comment:
   Same as above.



##########
seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/source/MaxcomputeSourceFactory.java:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.maxcompute.source;
+
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.ACCESS_ID;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.ACCESS_KEY;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.ENDPOINT;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.PROJECT;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.RESULT_TABLE_NAME;
+
+import org.apache.seatunnel.api.configuration.util.OptionRule;
+import org.apache.seatunnel.api.table.factory.Factory;
+import org.apache.seatunnel.api.table.factory.TableSourceFactory;
+
+import com.google.auto.service.AutoService;
+
+@AutoService(Factory.class)
+public class MaxcomputeSourceFactory implements TableSourceFactory {
+    @Override
+    public String factoryIdentifier() {
+        return "Maxcompute";
+    }
+
+    @Override
+    public OptionRule optionRule() {

Review Comment:
   Please add optionRule test.



##########
docs/en/connector-v2/sink/Maxcompute.md:
##########
@@ -0,0 +1,80 @@
+# Maxcompute
+
+> Maxcompute sink connector
+
+## Description
+
+Used to read data from Maxcompute.
+
+## Key features
+
+- [x] [batch](../../concept/connector-v2-features.md)
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [schema projection](../../concept/connector-v2-features.md)
+- [x] [parallelism](../../concept/connector-v2-features.md)
+
+## Options
+
+| name                    | type    | required  | default value |
+|-------------------------|---------|-----------|---------------|
+| accessId                | string  | yes       | -             |
+| accesskey               | string  | yes       | -             |
+| endpoint                | string  | yes       | -             |
+| project                 | string  | yes       | -             |
+| result_table_name       | string  | yes       | -             |
+| partition_spec          | string  | no        | -             |
+| overwrite               | boolean | no        | false         |
+
+### accessId [string]
+
+`accessId` Your Maxcompute accessId which cloud be access from Alibaba Cloud.
+
+### accesskey [string]
+
+`accesskey` Your Maxcompute accessKey which cloud be access from Alibaba Cloud.
+
+### endpoint [string]
+
+`endpoint` Your Maxcompute endpoint start with http.
+
+### project [string]
+
+`project` Your Maxcompute project which is created in Alibaba Cloud.
+
+### result_table_name [string]
+
+`result_table_name` Target Maxcompute table name eg: fake.
+
+### partition_spec [string]
+
+`partition_spec` This spec of Maxcompute partition table eg:ds='20220101'.
+
+### overwrite [boolean]
+
+`overwrite` Whether to overwrite the table or partition, default: false.
+
+### common options 
+
+Sink plugin common parameters, please refer to [Sink Common 
Options](common-options.md) for details.
+
+## Examples
+
+```hocon
+sink {
+  MaxcomputeSink {
+    accessId="<your access id>"
+    accesskey="<your access Key>"
+    endpoint="<http://service.odps.aliyun.com/api>"
+    project="<your project>"
+    result_table_name="<your table name>"
+    #partition_spec="<your partition spec>"
+    #overwrite = false
+  }
+}
+```
+
+## Changelog
+
+### 2.1.3-beta 2022-12-05

Review Comment:
   Use `next version` will be better.



##########
seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/sink/MaxcomputeWriter.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.maxcompute.sink;
+
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.PARTITION_SPEC;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.PROJECT;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.RESULT_TABLE_NAME;
+
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+import 
org.apache.seatunnel.connectors.seatunnel.common.sink.AbstractSinkWriter;
+import 
org.apache.seatunnel.connectors.seatunnel.maxcompute.source.MaxcomputeSource;
+import 
org.apache.seatunnel.connectors.seatunnel.maxcompute.util.MaxcomputeTypeMapper;
+import 
org.apache.seatunnel.connectors.seatunnel.maxcompute.util.MaxcomputeUtil;
+
+import org.apache.seatunnel.shade.com.typesafe.config.Config;
+
+import com.aliyun.odps.OdpsException;
+import com.aliyun.odps.PartitionSpec;
+import com.aliyun.odps.Table;
+import com.aliyun.odps.TableSchema;
+import com.aliyun.odps.data.Record;
+import com.aliyun.odps.data.RecordWriter;
+import com.aliyun.odps.tunnel.TableTunnel;
+import com.aliyun.odps.tunnel.TunnelException;
+import lombok.extern.slf4j.Slf4j;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+@Slf4j
+public class MaxcomputeWriter extends AbstractSinkWriter<SeaTunnelRow, Void> {
+    private static final Logger LOG = 
LoggerFactory.getLogger(MaxcomputeSource.class);
+    private final SeaTunnelRowType seaTunnelRowType;
+    private final RecordWriter recordWriter;
+    private final TableTunnel.UploadSession session;
+    private final TableSchema tableSchema;
+
+    private Config pluginConfig;
+
+    public MaxcomputeWriter(SeaTunnelRowType seaTunnelRowType, Config 
pluginConfig) {
+        this.seaTunnelRowType = seaTunnelRowType;
+        this.pluginConfig = pluginConfig;
+        try {
+            Table table = MaxcomputeUtil.getTable(pluginConfig);
+            this.tableSchema = table.getSchema();
+            TableTunnel tunnel = MaxcomputeUtil.getTableTunnel(pluginConfig);
+            if (this.pluginConfig.hasPath(PARTITION_SPEC.key())) {
+                PartitionSpec partitionSpec = new 
PartitionSpec(this.pluginConfig.getString(PARTITION_SPEC.key()));
+                session = 
tunnel.createUploadSession(pluginConfig.getString(PROJECT.key()), 
pluginConfig.getString(RESULT_TABLE_NAME.key()), partitionSpec);
+            } else {
+                session = 
tunnel.createUploadSession(pluginConfig.getString(PROJECT.key()), 
pluginConfig.getString(RESULT_TABLE_NAME.key()));
+            }
+            this.recordWriter = 
session.openRecordWriter(Thread.currentThread().getId());
+            LOG.info("open record writer success");
+        } catch (OdpsException e) {
+            throw new RuntimeException(e);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public void write(SeaTunnelRow element) throws IOException {
+        Record record = MaxcomputeTypeMapper.getRecord(element, 
this.seaTunnelRowType, this.session, this.tableSchema);
+        recordWriter.write(record);
+    }
+
+    @Override
+    public void close() throws IOException {
+        this.recordWriter.close();
+        try {
+            this.session.commit(new Long[]{Thread.currentThread().getId()});
+        } catch (TunnelException e) {
+            throw new RuntimeException(e);

Review Comment:
   Unify exception for connector.



##########
seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/config/MaxcomputeConfig.java:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.maxcompute.config;
+
+import org.apache.seatunnel.api.configuration.Option;
+import org.apache.seatunnel.api.configuration.Options;
+
+import java.io.Serializable;
+
+public class MaxcomputeConfig implements Serializable {
+    private static final int SPLIT_ROW_DEFAULT = 10000;
+    public static final Option<String> ACCESS_ID = 
Options.key("accessId").stringType().noDefaultValue()
+        .withDescription("Your Maxcompute accessId which cloud be access from 
Alibaba Cloud");
+    public static final Option<String> ACCESS_KEY = 
Options.key("accesskey").stringType().noDefaultValue()
+        .withDescription("Your Maxcompute accessKey which cloud be access from 
Alibaba Cloud");
+    public static final Option<String> ENDPOINT = 
Options.key("endpoint").stringType().noDefaultValue()
+        .withDescription("Your Maxcompute endpoint start with http");
+    public static final Option<String> PROJECT = 
Options.key("project").stringType().noDefaultValue()
+        .withDescription("Your Maxcompute project which is created in Alibaba 
Cloud");
+    public static final Option<String> RESULT_TABLE_NAME = 
Options.key("result_table_name").stringType().noDefaultValue()
+        .withDescription("Target Maxcompute table name eg: fake");
+    public static final Option<String> PARTITION_SPEC = 
Options.key("partition_spec").stringType().noDefaultValue()
+        .withDescription("This spec of Maxcompute partition table.");
+    public static final Option<Integer> SPLIT_ROW = 
Options.key("split_row").intType().defaultValue(SPLIT_ROW_DEFAULT)
+        .withDescription("Number of rows per split. default: 10000");
+    public static final Option<Boolean> OVERWRITE = 
Options.key("overwrite").booleanType().defaultValue(false)
+        .withDescription("Whether to overwrite the table or partition");

Review Comment:
   Please fix code style.You can refer this pr : 
https://github.com/apache/incubator-seatunnel/commit/e68ecf7bef32f6dd5bb44c569ec30216fde96e72



##########
seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/sink/MaxcomputeSinkFactory.java:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.maxcompute.sink;
+
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.ACCESS_ID;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.ACCESS_KEY;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.ENDPOINT;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.PROJECT;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.RESULT_TABLE_NAME;
+
+import org.apache.seatunnel.api.configuration.util.OptionRule;
+import org.apache.seatunnel.api.table.factory.Factory;
+import org.apache.seatunnel.api.table.factory.TableSinkFactory;
+
+import com.google.auto.service.AutoService;
+
+@AutoService(Factory.class)
+public class MaxcomputeSinkFactory implements TableSinkFactory {
+    @Override
+    public String factoryIdentifier() {
+        return "Maxcompute";
+    }
+
+    @Override
+    public OptionRule optionRule() {

Review Comment:
   Add UT for optionRule() please.



##########
seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/sink/MaxcomputeWriter.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.maxcompute.sink;
+
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.PARTITION_SPEC;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.PROJECT;
+import static 
org.apache.seatunnel.connectors.seatunnel.maxcompute.config.MaxcomputeConfig.RESULT_TABLE_NAME;
+
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+import 
org.apache.seatunnel.connectors.seatunnel.common.sink.AbstractSinkWriter;
+import 
org.apache.seatunnel.connectors.seatunnel.maxcompute.source.MaxcomputeSource;
+import 
org.apache.seatunnel.connectors.seatunnel.maxcompute.util.MaxcomputeTypeMapper;
+import 
org.apache.seatunnel.connectors.seatunnel.maxcompute.util.MaxcomputeUtil;
+
+import org.apache.seatunnel.shade.com.typesafe.config.Config;
+
+import com.aliyun.odps.OdpsException;
+import com.aliyun.odps.PartitionSpec;
+import com.aliyun.odps.Table;
+import com.aliyun.odps.TableSchema;
+import com.aliyun.odps.data.Record;
+import com.aliyun.odps.data.RecordWriter;
+import com.aliyun.odps.tunnel.TableTunnel;
+import com.aliyun.odps.tunnel.TunnelException;
+import lombok.extern.slf4j.Slf4j;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+@Slf4j
+public class MaxcomputeWriter extends AbstractSinkWriter<SeaTunnelRow, Void> {
+    private static final Logger LOG = 
LoggerFactory.getLogger(MaxcomputeSource.class);

Review Comment:
   Already using @Slf4j, LOG may not be useful.



##########
seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/util/MaxcomputeTypeMapper.java:
##########
@@ -0,0 +1,188 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.maxcompute.util;
+
+import org.apache.seatunnel.api.table.type.BasicType;
+import org.apache.seatunnel.api.table.type.DecimalType;
+import org.apache.seatunnel.api.table.type.LocalTimeType;
+import org.apache.seatunnel.api.table.type.PrimitiveByteArrayType;
+import org.apache.seatunnel.api.table.type.SeaTunnelDataType;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+
+import org.apache.seatunnel.shade.com.typesafe.config.Config;
+
+import com.aliyun.odps.Column;
+import com.aliyun.odps.Table;
+import com.aliyun.odps.TableSchema;
+import com.aliyun.odps.data.Record;
+import com.aliyun.odps.tunnel.TableTunnel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+public class MaxcomputeTypeMapper implements Serializable {
+
+    private static final Logger LOG = 
LoggerFactory.getLogger(MaxcomputeTypeMapper.class);
+
+    // ============================data types=====================
+
+    private static final String MAXCOMPUTE_UNKNOWN = "UNKNOWN";
+    private static final String MAXCOMPUTE_BOOLEAN = "BOOLEAN";
+
+    // -------------------------number----------------------------
+    private static final String MAXCOMPUTE_TINYINT = "TINYINT";
+    private static final String MAXCOMPUTE_SMALLINT = "SMALLINT";
+    private static final String MAXCOMPUTE_INT = "INT";
+    private static final String MAXCOMPUTE_BIGINT = "BIGINT";
+
+    private static final String MAXCOMPUTE_FLOAT = "FLOAT";
+
+    private static final String MAXCOMPUTE_DOUBLE = "DOUBLE";
+    private static final String MAXCOMPUTE_DECIMAL = "DECIMAL32";
+
+
+    // -------------------------string----------------------------
+
+    private static final String MAXCOMPUTE_VARCHAR = "VARCHAR";
+    private static final String MAXCOMPUTE_CHAR = "CHAR";
+    private static final String MAXCOMPUTE_STRING = "STRING";
+
+
+    // ------------------------------time-------------------------
+
+    private static final String MAXCOMPUTE_DATE = "DATE";
+    private static final String MAXCOMPUTE_DATETIME = "DATETIME";
+    private static final String MAXCOMPUTE_TIMESTAMP = "TIMESTAMP";
+
+
+    // ------------------------------blob-------------------------
+
+    private static final String MAXCOMPUTE_BINARY = "BINARY";
+    private static final int PRECISION = 20;
+
+    private static SeaTunnelDataType<?> mapping(List<Column> columnSchemaList, 
int colIndex) throws SQLException {
+        String maxcomputeType = 
columnSchemaList.get(colIndex).getTypeInfo().getTypeName().toUpperCase();
+        switch (maxcomputeType) {
+            case MAXCOMPUTE_BOOLEAN:
+                return BasicType.BOOLEAN_TYPE;
+            case MAXCOMPUTE_TINYINT:
+            case MAXCOMPUTE_SMALLINT:
+            case MAXCOMPUTE_INT:
+                return BasicType.INT_TYPE;
+            case MAXCOMPUTE_BIGINT:
+                return BasicType.LONG_TYPE;
+            case MAXCOMPUTE_DECIMAL:
+                return new DecimalType(PRECISION, 0);
+            case MAXCOMPUTE_FLOAT:
+                return BasicType.FLOAT_TYPE;
+            case MAXCOMPUTE_DOUBLE:
+                return BasicType.DOUBLE_TYPE;
+            case MAXCOMPUTE_VARCHAR:
+            case MAXCOMPUTE_CHAR:
+            case MAXCOMPUTE_STRING:
+                return BasicType.STRING_TYPE;
+            case MAXCOMPUTE_DATE:
+            case MAXCOMPUTE_DATETIME:
+            case MAXCOMPUTE_TIMESTAMP:
+                return LocalTimeType.LOCAL_DATE_TIME_TYPE;
+            case MAXCOMPUTE_BINARY:
+                return PrimitiveByteArrayType.INSTANCE;
+            //Doesn't support yet
+            case MAXCOMPUTE_UNKNOWN:
+            default:
+                throw new UnsupportedOperationException(

Review Comment:
   Unify exception.



-- 
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]

Reply via email to