Allow decimal values in settings using seconds#37187
Allow decimal values in settings using seconds#37187yakov-olkhovskiy merged 13 commits intoClickHouse:masterfrom
Conversation
|
Apparently there are settings ( |
745965d to
a2870ef
Compare
|
clang-tidy is complaining (without reason) but it can be workaround. |
Ok, nevermind. That test is setting The I could find that the following tests are setting
I'm going to lower their values to 0 since that's what they were effectively using before. |
Before the change to use floats, this settings were getting 0 as the parsed value, so keep the old value by setting to zero explicitly
|
Tests:
|
src/Core/SettingsFields.cpp
Outdated
There was a problem hiding this comment.
This change can be source of incompatibility for some weird cases, where we rely on integer. But overall shouldn't be an issue, I believe.
There was a problem hiding this comment.
If you have any reservation about a specific case let me know and I'll add some extra tests to make sure everything works as expected.
There was a problem hiding this comment.
frankly can't find anything at least in code... otherwise it will be a proper conversion I think.
src/Core/SettingsFields.cpp
Outdated
There was a problem hiding this comment.
I think it's better to comment it in terms of lost precision for seconds due to requirements for backward compatibility - we will lose context of this PR in source code - will be not clear unchanged from what.
There was a problem hiding this comment.
True. I'll improve the comment.
afdca95 to
4319432
Compare
|
@Algunenano 01287_max_execution_speed is failing due to different output |
Thanks a lot for the ping. I have no idea what I did. I remember fixing those issues (and I even wrote about it) but they are broken, so not sure if I dreamed it or discard some changes during the rebase (Or I did it in the other PC and never pushed). I'll have a look and fix the issues. Sorry for the noise. Update: Yes, I broke it during the rebase (because I switched computers and didn't pull the fixes I had done) |
4319432 to
cd4020f
Compare
|
@Algunenano BTW is this force-push made by github itself? I found that force-push often is very messy... |
No. I did it because the branch was pretty old and rebased instead of merged master/HEAD. |
|
@Algunenano seems we hit a rare case of CI fluke here: |
|
@Mergifyio update |
✅ Branch has been successfully updated |
|
I guess that you need any new commit so I've asked the bot to update the branch. If you actually need a force push let me know and I'll do it tomorrow. |
|
@mergify update |
✅ Branch has been successfully updated |
|
|
||
| -- Ok values | ||
| SELECT 1 SETTINGS max_execution_time=-0.5; | ||
| SELECT 1 SETTINGS max_execution_time=0.5; |
There was a problem hiding this comment.
DB::Exception: Timeout exceeded: elapsed 0.505827683 seconds, maximum: 0.5. :(
https://s3.amazonaws.com/clickhouse-test-reports/39507/fe1e326701b0566881dc7d51793125a911faa07e/stateless_tests__tsan__[2_5].html
There was a problem hiding this comment.
I'll raise it. There are other test already covering 0.something so we don't need to keep a subsecond value here
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Changes how settings using
secondsas type are parsed to support floating point values (for example:max_execution_time=0.5). Infinity or NaN values will throw an exception.Maintains milliseconds as it was.
Closes #36940