-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GROUP BY error when setting compress_segmentby with an enum column #4619
Conversation
Enclose braces around empty if statement. Fixed build error on MacOS X.
Codecov Report
@@ Coverage Diff @@
## main #4619 +/- ##
==========================================
- Coverage 90.77% 90.76% -0.01%
==========================================
Files 224 224
Lines 41857 41975 +118
==========================================
+ Hits 37994 38098 +104
- Misses 3863 3877 +14
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not change the vartype of the Var but instead fall back to anyenum lookup for the operators when the type is an enum and the lookup with the explicit type fails.
tsl/src/fdw/scan_plan.c
Outdated
if (has_null_input) | ||
{ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (has_null_input) | |
{ | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by removing the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you forgot to remove it, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, i had this change in my main branch. Thus this change was re-appearing again and again. Reverted this change in main branch and fixed in current branch as well.
Some comments:
|
9c24007
to
ba9950c
Compare
else | ||
{ | ||
elog(ERROR, "Invalid segmentby column"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this branch? If yes shouldn't have a test case for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that its good to have a testcase. However iam not sure what test will hit this code.
I think it's better to have this code, so that it may hit in future. If we remove this, then code may further execute and report some unknown error or even worse case crash or return wrong results.
Seems your code editor messed (automatically formatted) the CHANGELOG.md... we prefer to send coding format changes into a separated PR because it make useless the git blame. Check the .git-blame-ignore-revs in the root of source three. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to have similar check when we enable compression for the hypertable. No point having a compressed hypertable that errors when you try to query it.
} | ||
else | ||
{ | ||
elog(ERROR, "Invalid segmentby column"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not conform to pg error message style guide: https://www.postgresql.org/docs/current/error-style-guide.html
Should probably be more along the lines of sort operator lookup failed for column "%s"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed as per your suggestion.
Right, its my editor which screwed up the formatting. Fixed now. |
May be yes. But i dont have all the context required to check for these conditions during ALTER TABLE ... ENABLE COMPRESSION. |
684064f
to
ba64a68
Compare
} | ||
else | ||
{ | ||
elog(ERROR, "Sort operator lookup failed for column \"%s\"", column_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elog(ERROR, "Sort operator lookup failed for column \"%s\"", column_name); | |
elog(ERROR, "sort operator lookup failed for column \"%s\"", column_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Revert "Build error" This reverts commit e841fed. Fixed formatting in error message. Addressed review comments. Fixed formatting of CHANGELOG.md file. Addressed review comments. Updated error message as per Sven suggestion.
Co-authored-by: Sven Klemm <31455525+svenklemm@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed Sven comment.
No description provided.