Skip to content

fix: parse boolean properties case-insensitively - #847

Open
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/parse-boolean-properties-ignore-case
Open

fix: parse boolean properties case-insensitively#847
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/parse-boolean-properties-ignore-case

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • parse boolean table and catalog properties case-insensitively, matching Java's Boolean.parseBoolean
  • continue treating values other than a case-insensitive true as false
  • add coverage for lowercase, uppercase, mixed-case, false, and unrecognized values

Testing

  • util_test --gtest_filter=ConfigTest.ParseBooleanIgnoringCase
  • pre-commit hooks for the changed files

Comment thread src/iceberg/util/config.h
return val;
} else if constexpr (std::is_same_v<U, bool>) {
return val == "true";
return StringUtils::EqualsIgnoreCase(val, "true");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure you did but it would ne nice to check for other places in the code base where similar comparison with literals is made.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I found the same case-sensitive parsing in the S3 properties and pushed a follow-up for s3.ssl.enabled and s3.path-style-access. The other literal comparisons I found are Avro schema attributes rather than configuration properties, so I left those unchanged.

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.

3 participants