hudi-agent commented on code in PR #19159:
URL: https://github.com/apache/hudi/pull/19159#discussion_r3521454517
##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/TableCommand.java:
##########
@@ -206,7 +206,7 @@ public String fetchTableSchema(
TableSchemaResolver tableSchemaResolver = new TableSchemaResolver(client);
HoodieSchema schema = tableSchemaResolver.getTableSchema();
if (outputFilePath != null) {
- log.info("Latest table schema : " + schema.toString(true));
+ log.info("Latest table schema : {}", schema.toString(true));
Review Comment:
🤖 nit: `schema.toString(true)` is still called eagerly here, so the
lazy-evaluation benefit of parameterized logging doesn't kick in if the log
level is disabled. Since the same call appears on the next line for
`writeToFile`, could you extract it to a local variable — `String schemaStr =
schema.toString(true);` — and pass `schemaStr` to both?
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]