Skip to content
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

[Improvement] Add Unknown column data type to handle an unresolvable type from the catalog #2117

Closed
mchades opened this issue Feb 6, 2024 · 6 comments · Fixed by #2140
Closed
Assignees
Labels
improvement Improvements on everything

Comments

@mchades
Copy link
Contributor

mchades commented Feb 6, 2024

What would you like to be improved?

If a column data type in the catalog does not have a mapping in Gravitino, an exception will be thrown.

Ideally, we should map all data types from a catalog to Gravitino. However, in practical situations, loading exceptions may occur due to the addition of new data types or insufficient mapping support.

How should we improve?

Add an Unknown column data type to handle an unresolvable type from the catalog, to ensure the table load successfully

@mchades mchades added the improvement Improvements on everything label Feb 6, 2024
@FANNG1
Copy link
Contributor

FANNG1 commented Feb 6, 2024

+1, loadTable is import for the newbies to try Gravitino

@SteNicholas
Copy link
Member

@mchades, could you assign this ticket to me? Thanks.

SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 7, 2024
… handle an unresolvable type from the catalog
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 8, 2024
… handle an unresolvable type from the catalog
@FANNG1
Copy link
Contributor

FANNG1 commented Feb 8, 2024

@jerryshao , what do you think to introducing Unknown Type?

@jerryshao
Copy link
Contributor

If it is a unknown type, how would user know the actual type of the underlying sources? I would suggest to treat like a unparsed/unresolved type like what we do for unparsed expression, WDYT?

@FANNG1
Copy link
Contributor

FANNG1 commented Feb 9, 2024

@SteNicholas can we use a UnparsedType like UnparsedExpression with a field to describe underlying types?

@SteNicholas
Copy link
Member

@SteNicholas can we use a UnparsedType like UnparsedExpression with a field to describe underlying types?

@FANNG1, I will update the pull request to use UnparsedType. cc @mchades

@jerryshao jerryshao added this to the Gravitino 0.5.0 milestone Feb 20, 2024
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 22, 2024
… handle an unresolvable type from the catalog
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 22, 2024
…o handle an unresolvable type from the catalog
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 22, 2024
…o handle an unresolvable type from the catalog
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 22, 2024
…o handle an unresolvable type from the catalog
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 22, 2024
…o handle an unresolvable type from the catalog
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 22, 2024
…o handle an unresolvable type from the catalog
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 22, 2024
…o handle an unresolvable type from the catalog
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 22, 2024
…o handle an unresolvable type from the catalog
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 22, 2024
…o handle an unresolvable type from the catalog
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 23, 2024
…o handle an unresolvable type from the catalog
SteNicholas added a commit to SteNicholas/gravitino that referenced this issue Feb 23, 2024
…o handle an unresolvable type from the catalog
mchades pushed a commit that referenced this issue Feb 23, 2024
…le an unresolvable type from the catalog (#2140)

### What changes were proposed in this pull request?

`Type` adds `UNPARSED` column data type to handle an unresolvable type
from the catalog.

### Why are the changes needed?

If a column data type in the catalog does not have a mapping in
Gravitino, an exception will be thrown. We should map all data types
from a catalog to Gravitino. However, in practical situations, loading
exceptions may occur due to the addition of new data types or
insufficient mapping support. Introduce `UnparsedType` to represent the
unparsed data type.

Fix: #2117 

### Does this PR introduce _any_ user-facing change?

`Type` adds `UNKNOWN` column data type that represents an unresolvable
type.

### How was this patch tested?

- `TestJsonUtils#testTypeSerDe`
- `TestTypes#testUnparsedType`
- `TestTypeConverter#testTypeConverter`
- `TestMysqlTypeConverter#testToGravitinoType`
- `TestPostgreSqlTypeConverter#testToGravitinoType`
- `CatalogMysqlIT#testUnparsedTypeConverter`
- `CatalogPostgreSqlIT#testUnparsedTypeConverter`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements on everything
Projects
None yet
4 participants