Skip to content

[Bug] [connector-jdbc-kingbase]Error in Jdbc Source with Kingbase8: Unsupported Field Data Types (e.g., smallint) during Catalog Table Lookup #8866 #8874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public class KingbaseTypeConverter extends PostgresTypeConverter {
public static final String KB_BLOB = "BLOB";
public static final String KB_CLOB = "CLOB";
public static final String KB_BIT = "BIT";
public static final String KB_INT = "INT";
public static final String KB_SMALLINT = "SMALLINT";
public static final String KB_BIGINT = "BIGINT";

public static final KingbaseTypeConverter INSTANCE = new KingbaseTypeConverter();

Expand Down Expand Up @@ -88,6 +91,15 @@ public Column convert(BasicTypeDefine typeDefine) {
byteLength += typeDefine.getLength() % 8 > 0 ? 1 : 0;
builder.columnLength(byteLength);
break;
case KB_SMALLINT:
builder.dataType(BasicType.SHORT_TYPE);
break;
case KB_INT:
builder.dataType(BasicType.INT_TYPE);
break;
case KB_BIGINT:
builder.dataType(BasicType.LONG_TYPE);
break;
default:
throw CommonError.convertToSeaTunnelTypeError(
DatabaseIdentifier.KINGBASE,
Expand Down
Loading