You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "lianghongjia6 (via GitHub)" <gi...@apache.org> on 2025/04/30 09:08:59 UTC
[PR] [FLINK-37752][json] Make configuration 'json.decode.json-parser.enabled' take effect [flink]
lianghongjia6 opened a new pull request, #26522:
URL: https://github.com/apache/flink/pull/26522
## What is the purpose of the change
- Make configuration 'json.decode.json-parser.enabled' take effect. The configuration 'json.decode.json-parser.enabled' will never take effect, because of this configuration has not been added in `org.apache.flink.formats.json.JsonFormatFactory#optionalOptions`.
## Brief change log
- Make configuration 'json.decode.json-parser.enabled' take effect.
## Verifying this change
This change added tests and can be verified as follows:
- Added test `JsonFormatFactoryTest#testDecodeJsonParseEnabled`
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes / **no**)
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
- The serializers: (yes / no / don't know)
- The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't know)
- The S3 file system connector: (yes / **no** / don't know)
## Documentation
- Does this pull request introduce a new feature? (yes / **no**)
- If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
--
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-37752][json] Make configuration 'json.decode.json-parser.enabled' take effect [flink]
Posted by "masteryhx (via GitHub)" <gi...@apache.org>.
masteryhx commented on code in PR #26522:
URL: https://github.com/apache/flink/pull/26522#discussion_r2075251245
##########
flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonFormatFactory.java:
##########
@@ -191,6 +191,7 @@ public Set<ConfigOption<?>> optionalOptions() {
options.add(MAP_NULL_KEY_LITERAL);
options.add(ENCODE_DECIMAL_AS_PLAIN_NUMBER);
options.add(ENCODE_IGNORE_NULL_FIELDS);
+ options.add(DECODE_JSON_PARSER_ENABLED);
Review Comment:
IIUC, it should also be added in forwardOptions and other JsonFormatFactory, right?
--
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-37752][json] Make configuration 'json.decode.json-parser.enabled' take effect [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #26522:
URL: https://github.com/apache/flink/pull/26522#discussion_r2070446159
##########
flink-formats/flink-json/src/test/java/org/apache/flink/formats/json/JsonFormatFactoryTest.java:
##########
@@ -125,6 +125,51 @@ void testLowerCaseOptionForMapNullKeyMode() {
testSchemaDeserializationSchema(tableOptions);
}
+ @Test
+ void testDecodeJsonParseEnabled() {
+ // test enabled
+ final Map<String, String> enabledParseTableOptions =
+ getModifyOptions(options -> options.put("json.decode.json-parser.enabled", "true"));
+
+ DeserializationSchema<RowData> actualEnabledParseDeser =
Review Comment:
maybe extend the test so that when true it can deal with nested projection pushdown and when false it cannot . This would show the value is being honoured
--
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-37752][json] Make configuration 'json.decode.json-parser.enabled' take effect [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #26522:
URL: https://github.com/apache/flink/pull/26522#discussion_r2070440644
##########
flink-formats/flink-json/src/test/java/org/apache/flink/formats/json/JsonFormatFactoryTest.java:
##########
@@ -125,6 +125,51 @@ void testLowerCaseOptionForMapNullKeyMode() {
testSchemaDeserializationSchema(tableOptions);
}
+ @Test
+ void testDecodeJsonParseEnabled() {
+ // test enabled
+ final Map<String, String> enabledParseTableOptions =
+ getModifyOptions(options -> options.put("json.decode.json-parser.enabled", "true"));
+
+ DeserializationSchema<RowData> actualEnabledParseDeser =
Review Comment:
it looks like the code repeated. I suggest. parameterized test passing in the 2 boolean values.
--
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-37752][json] Make configuration 'json.decode.json-parser.enabled' take effect [flink]
Posted by "lianghongjia6 (via GitHub)" <gi...@apache.org>.
lianghongjia6 commented on PR #26522:
URL: https://github.com/apache/flink/pull/26522#issuecomment-2841429635
@flinkbot run azure
--
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-37752][json] Make configuration 'json.decode.json-parser.enabled' take effect [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #26522:
URL: https://github.com/apache/flink/pull/26522#issuecomment-2841326698
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "00a4108e41066302e25cb384d2698c5b2708cd30",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "00a4108e41066302e25cb384d2698c5b2708cd30",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 00a4108e41066302e25cb384d2698c5b2708cd30 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-37752][json] Make configuration 'json.decode.json-parser.enabled' take effect [flink]
Posted by "masteryhx (via GitHub)" <gi...@apache.org>.
masteryhx merged PR #26522:
URL: https://github.com/apache/flink/pull/26522
--
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