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

use TypeInfo to serialize to MetacatType instead of ObjectInspector #585

Conversation

stevie9868
Copy link
Contributor

@stevie9868 stevie9868 commented Apr 9, 2024

Previously for both hive and iceberg table, we use Hive ObjectInspector when serializing the schema into Metacat type but Hive ObjectInspector will internally lowercase every fieldNames, which breaks the fidelity of the fieldName.

Even though hive ObjectInspector contains fieldName and fieldType information, it's core purpose is to inspect the actual data of a hive field, which is not needed for schema description.

And instead we can just simply serialize schema directly using the Hive TypeInfo, which also contains the information such as field name and field type. And one advantage of using TypeInfo is that it preserves the fidelity of the fieldName.

@stevie9868 stevie9868 force-pushed the yingjianw/getCannonicalTypeUsingTypeInfoInsteadOfObjectInspector branch 5 times, most recently from d2df4c6 to 481df53 Compare April 14, 2024 23:41
@stevie9868 stevie9868 force-pushed the yingjianw/getCannonicalTypeUsingTypeInfoInsteadOfObjectInspector branch from 481df53 to 16657c4 Compare April 15, 2024 01:22
@stevie9868 stevie9868 merged commit 6aac778 into master Apr 16, 2024
2 checks passed
stevie9868 added a commit that referenced this pull request May 1, 2024
stevie9868 added a commit that referenced this pull request May 1, 2024
stevie9868 added a commit that referenced this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants