[FLINK-36154][formats] Support deserialize json ignore key case
What is the purpose of the change
Support to parse json string ignore the key case while match to schema field name. Sometimes we defined a table in flink sql, like test_tbl(a String, b String), but sometimes when the json string from the mq(kafka/pulsar) may be like {"A":"a", "B":"b"}, and the field a and b will not be parsed as the case of key not match.
Brief change log
Introduce a config json.ignore-key-case to ignore the key case while parse json string.
Verifying this change
This change added tests and can be verified as follows:
add unit test testIgnoreKeyCase in JsonParserRowDataDeSerSchemaTest.java
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: (yes)
- 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 / docs / JavaDocs / not documented)
CI report:
- de35f05c50ba48d923212cb7f9fa22f136aab15d Azure: SUCCESS
Bot commands
The @flinkbot bot supports the following commands:@flinkbot run azurere-run the last Azure build
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 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.