@Override
    public BasicTypeDefine reconvert(Column column) {
        BasicTypeDefine.BasicTypeDefineBuilder builder =
                BasicTypeDefine.builder()
                        .name(column.getName())
                        .nullable(column.isNullable())
                        .comment(column.getComment())
                        .defaultValue(column.getDefaultValue());
        switch (column.getDataType().getSqlType()) {
            case BOOLEAN:
                builder.columnType(HANA_BOOLEAN);
                builder.dataType(HANA_BOOLEAN);
                builder.length(2L);
                break;
            case TINYINT:
                builder.columnType(HANA_TINYINT);
                builder.dataType(HANA_TINYINT);
                break;
            case SMALLINT:
                builder.columnType(HANA_SMALLINT);
                builder.dataType(HANA_SMALLINT);
                break;
            case INT:
                builder.columnType(HANA_INTEGER);
                builder.dataType(HANA_INTEGER);
                break;
            case BIGINT:
                builder.columnType(HANA_BIGINT);
                builder.dataType(HANA_BIGINT);
                break;
            case FLOAT:
                builder.columnType(HANA_REAL);
                builder.dataType(HANA_REAL);
                break;
            case DOUBLE:
                builder.columnType(HANA_DOUBLE);
                builder.dataType(HANA_DOUBLE);
                break;
            case DECIMAL:
                DecimalType decimalType = (DecimalType) column.getDataType();
                long precision = decimalType.getPrecision();
                int scale = decimalType.getScale();
                if (precision <= 0) {
                    precision = DEFAULT_PRECISION;
                    scale = DEFAULT_SCALE;
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which is precision less than 0, "
                                    + "it will be converted to decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            precision,
                            scale);
                } else if (precision > MAX_PRECISION) {
                    scale = (int) Math.max(0, scale - (precision - MAX_PRECISION));
                    precision = MAX_PRECISION;
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which exceeds the maximum precision of {}, "
                                    + "it will be converted to decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            MAX_PRECISION,
                            precision,
                            scale);
                }
                if (scale < 0) {
                    scale = 0;
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which is scale less than 0, "
                                    + "it will be converted to decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            precision,
                            scale);
                } else if (scale > MAX_SCALE) {
                    scale = MAX_SCALE;
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which exceeds the maximum scale of {}, "
                                    + "it will be converted to decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            MAX_SCALE,
                            precision,
                            scale);
                }
                builder.columnType(String.format("%s(%s,%s)", HANA_DECIMAL, precision, scale));
                builder.dataType(HANA_DECIMAL);
                builder.precision(precision);
                builder.scale(scale);
                break;
            case BYTES:
                builder.columnType(HANA_BLOB);
                builder.dataType(HANA_BLOB);
                break;
            case STRING:
                if (column.getColumnLength() == null
                        || column.getColumnLength() <= MAX_NVARCHAR_LENGTH) {
                    builder.columnType(HANA_NVARCHAR);
                    builder.dataType(HANA_NVARCHAR);
                    builder.length(
                            column.getColumnLength() == null
                                    ? MAX_NVARCHAR_LENGTH
                                    : column.getColumnLength());
                } else {
                    builder.columnType(HANA_CLOB);
                    builder.dataType(HANA_CLOB);
                }
                break;
            case DATE:
                builder.columnType(HANA_DATE);
                builder.dataType(HANA_DATE);
                break;
            case TIME:
                builder.columnType(HANA_TIME);
                builder.dataType(HANA_TIME);
                break;
            case TIMESTAMP:
                if (column.getScale() == null || column.getScale() <= 0) {
                    builder.columnType(HANA_SECONDDATE);
                    builder.dataType(HANA_SECONDDATE);
                } else {
                    int timestampScale = column.getScale();
                    if (column.getScale() > MAX_TIMESTAMP_SCALE) {
                        timestampScale = MAX_TIMESTAMP_SCALE;
                        log.warn(
                                "The timestamp column {} type timestamp({}) is out of range, "
                                        + "which exceeds the maximum scale of {}, "
                                        + "it will be converted to timestamp({})",
                                column.getName(),
                                column.getScale(),
                                MAX_TIMESTAMP_SCALE,
                                timestampScale);
                    }
                    builder.columnType(HANA_TIMESTAMP);
                    builder.dataType(HANA_TIMESTAMP);
                    builder.scale(timestampScale);
                }
                break;
            default:
                throw CommonError.convertToConnectorTypeError(
                        DatabaseIdentifier.SAP_HANA,
                        column.getDataType().getSqlType().name(),
                        column.getName());
        }
        BasicTypeDefine typeDefine = builder.build();
        typeDefine.setColumnType(
                appendColumnSizeIfNeed(
                        typeDefine.getColumnType(), typeDefine.getLength(), typeDefine.getScale()));
        return typeDefine;
    }
@Test
    public void testReconvertUnsupported() {
        Column column =
                PhysicalColumn.of(
                        "test",
                        new MapType<>(BasicType.STRING_TYPE, BasicType.STRING_TYPE),
                        (Long) null,
                        true,
                        null,
                        null);
        try {
            SapHanaTypeConverter.INSTANCE.reconvert(column);
            Assertions.fail();
        } catch (SeaTunnelRuntimeException e) {
            // ignore
        } catch (Throwable e) {
            Assertions.fail();
        }
    }