You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Au-Miner (via GitHub)" <gi...@apache.org> on 2026/06/01 14:41:09 UTC
[PR] [FLINK-35726][table] Honor @DataTypeHint on POJO fields in type conve… [flink]
Au-Miner opened a new pull request, #28288:
URL: https://github.com/apache/flink/pull/28288
## What is the purpose of the change
Fix a regression where `@DataTypeHint` placed on a POJO field is silently ignored when a `TypeInformation` is converted to a `DataType` (e.g., via `tableEnv.toDataStream(table, MyPojo.class).map(...)` followed by `fromDataStream`), causing fields like `Map<String, byte[]>` annotated `MAP<STRING, BYTES>` to fall back to `RAW`.
## Brief change log
- Add `DataTypeExtractor#extractFromField(DataTypeFactory, Field)` that resolves a field's `DataType` from its reflective `@DataTypeHint`, falling back to default extraction when no hint is present.
- In `TypeInfoDataTypeConverter#convertToStructuredType`, detect POJO fields that carry `@DataTypeHint` and delegate them to `DataTypeExtractor#extractFromField` instead of the `TypeInformation`-driven path; skip the subsequent primitive-bridging pass for those fields since the extractor already finalizes them.
## Verifying this change
Added a `PojoWithHintedMapField` test POJO and a parameterized case in `TypeInfoDataTypeConverterTest` that asserts a `HashMap<String, byte[]>` field annotated `@DataTypeHint("MAP<STRING, BYTES>")` resolves to `MAP<STRING, BYTES>` bridged to `HashMap` instead of `RAW('java.util.HashMap', ...)`.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
- The S3 file system connector: no
## Documentation
- Does this pull request introduce a new feature? no
- If yes, how is the feature documented? not applicable
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-35726][table] Honor @DataTypeHint on POJO fields in type conve… [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #28288: [FLINK-35726][table] Honor @DataTypeHint on POJO fields in type conve…
URL: https://github.com/apache/flink/pull/28288
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-35726][table] Honor @DataTypeHint on POJO fields in type conve… [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #28288:
URL: https://github.com/apache/flink/pull/28288#issuecomment-5926191683
This PR has been closed since it has not had any activity in 120 days.
If you feel like this was a mistake, or you would like to continue working on it,
please feel free to re-open the PR and ask for a review.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-35726][table] Honor @DataTypeHint on POJO fields in type conve… [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #28288:
URL: https://github.com/apache/flink/pull/28288#issuecomment-4593723641
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "494c489981eb6dedf7a7746fd8fa4f5a75b028fb",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "494c489981eb6dedf7a7746fd8fa4f5a75b028fb",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 494c489981eb6dedf7a7746fd8fa4f5a75b028fb UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-35726][table] Honor @DataTypeHint on POJO fields in type conve… [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #28288:
URL: https://github.com/apache/flink/pull/28288#issuecomment-5474792965
This PR is being marked as stale since it has not had any activity in the last 90 days.
If you would like to keep this PR alive, please leave a comment asking for a review.
If the PR has merge conflicts, update it with the latest from the base branch.
If you are having difficulty finding a reviewer, please reach out to the
community, contact details can be found here: https://flink.apache.org/what-is-flink/community/
If this PR is no longer valid or desired, please feel free to close it.
If no activity occurs in the next 30 days, it will be automatically closed.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org