Skip to content
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

Bool mixed affinity support #88

Merged
merged 30 commits into from
Dec 27, 2023

Conversation

mkgrgis
Copy link
Contributor

@mkgrgis mkgrgis commented Nov 8, 2023

This PR include:

  • ISO:SQL bool support where some text caseinsensetive values treated as boolean values both in SELECT and WHERE. Mixed affinity values support borrowed from code lines about UUID.
  • Multiversional separate bool support tests. No differences between versions noticed.
  • Refactor uuid_extension.c to sqlite_data_norm.c with changing indent style to PostgreSQL. This file in future PRs will contain SQLite internal functions for mixed affinity cases: float text Infinity equal to SQLite 9e999, maybe timestamps etc.
  • Reduce coalesce during deparsing UUID normalization function.
  • Refactor SQLite C-language UUID normalization function.
  • Improve UUID transfer productivity up to 10-15% because of 2 previous changes.
  • Fix some gcc 10.2+ warnings with PostgreSQL 16+.
  • Add uuid multi-versional tests and exclude to separate UUID test from type test.
  • Description about different UUID support in PostgreSQL 14- and PostgreSQL 14+ caused different bind call context.
  • Deny text affinity for PostgreSQL uuid column because of SQLite C-language UUID normalization function always gets result with blob affinity.
  • Improve error message about disallowed empty text during reading data for PostgreSQL column.

There are no UUID functionality changes, only code refactoring.

@mkgrgis
Copy link
Contributor Author

mkgrgis commented Nov 16, 2023

@t-kataym please start review of this PR by pgspider team when You'll have enough time for this.
I have no testing problems with this branch in my multiversional testing environment now.

If this PR is big for pgspider team work plan now, You can start review of small PRs when You'll have enough time. Small PRs see #89 or #89. It have got no conflicts with this PR.

@t-kataym
Copy link
Contributor

@mkgrgis Thank you for the PR. We will confirm it.

Copy link
Contributor

@nxhai98 nxhai98 left a comment

Choose a reason for hiding this comment

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

@mkgrgis I completed my 1st review. Could you check these comment?

License Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
test.sh Show resolved Hide resolved
sqlite_fdw.c Outdated Show resolved Hide resolved
expected/12.15/extra/bool.out Outdated Show resolved Hide resolved
expected/12.15/extra/bool.out Outdated Show resolved Hide resolved
expected/13.11/extra/bool.out Outdated Show resolved Hide resolved
@mkgrgis
Copy link
Contributor Author

mkgrgis commented Nov 29, 2023

@mkgrgis I completed my 1st review.

Thanks @nxhai98 ! First round is ended, let's begin the second.

@mkgrgis mkgrgis requested a review from nxhai98 November 30, 2023 04:14
Copy link
Contributor

@nxhai98 nxhai98 left a comment

Choose a reason for hiding this comment

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

I add some more comment for Warning fixing. Could you check that.

sqlite_fdw.c Outdated Show resolved Hide resolved
sqlite_fdw.c Show resolved Hide resolved
sqlite_fdw.c Outdated Show resolved Hide resolved
@mkgrgis
Copy link
Contributor Author

mkgrgis commented Dec 5, 2023

@t-kataym , could you please tell me about possible review date?

@t-kataym
Copy link
Contributor

t-kataym commented Dec 8, 2023

I'm sorry for late response.
I would like to review in the next week.

@mkgrgis
Copy link
Contributor Author

mkgrgis commented Dec 9, 2023

Thanks, @t-kataym ! It's important to have approximate PR plan for me. I hope better by ISO:SQL datatype-affinity table implementation will be merged in 5 PRs before 2024 year. Such PRs as int out of range, UUID fix with tests refactoring and real infinity presentation are yet implemented with tests. I am waiting only on reviews and step-by-step merging.

sqlite_data_norm.c Outdated Show resolved Hide resolved
sqlite_data_norm.c Outdated Show resolved Hide resolved
sqlite_data_norm.c Outdated Show resolved Hide resolved
@t-kataym
Copy link
Contributor

@mkgrgis I'm sorry for keeping you waiting. I finished my 1st review. Could you confirm my comments?

@mkgrgis mkgrgis requested a review from t-kataym December 15, 2023 04:46
@mkgrgis
Copy link
Contributor Author

mkgrgis commented Dec 15, 2023

Could you confirm my comments?

Yes, @t-kataym. All is confirmed and fixed in 72e1b22.

@mkgrgis
Copy link
Contributor Author

mkgrgis commented Dec 15, 2023

I have no other commits, @t-kataym . It was useful sed -i -e's/[ \t]*$//' ./*.c; for deleting tabs or whitespaces at the ends of code lines.
@t-kataym, have you got any comments now?

@mkgrgis mkgrgis mentioned this pull request Dec 22, 2023
Co-authored-by: LeAnhMinh <tsdv@localhost.localdomain>
sqlite_data_norm.c Outdated Show resolved Hide resolved
sqlite_data_norm.c Outdated Show resolved Hide resolved
sqlite_data_norm.c Outdated Show resolved Hide resolved
@t-kataym
Copy link
Contributor

@mkgrgis , Thank you for your fix. I finished the 2nd review and there are 2 comments. Could you fix them and rebase the code?

@mkgrgis
Copy link
Contributor Author

mkgrgis commented Dec 27, 2023

@mkgrgis , Thank you for your fix. I finished the 2nd review and there are 2 comments. Could you fix them and rebase the code?

Fixed in prev. commits and rebased in 899191c @t-kataym ! Thanks for review. Now I have no testing problems.

@mkgrgis mkgrgis requested a review from t-kataym December 27, 2023 06:09
@t-kataym
Copy link
Contributor

@mkgrgis Thank you for your update.
@nxhai98 Could you confirm changes again? If no problem, I will accept the PR.

@nxhai98
Copy link
Contributor

nxhai98 commented Dec 27, 2023

Hi @mkgrgis,

It seems your rebase process has problem: sql/15.3 directory should be removed.

Could you check again?

@mkgrgis
Copy link
Contributor Author

mkgrgis commented Dec 27, 2023

Could you check again?

Yes, deleted, @nxhai98 . Please recheck.

@nxhai98
Copy link
Contributor

nxhai98 commented Dec 27, 2023

@mkgrgis,

Thank you for updating.

@t-kataym,
I confirmed these changed.
and I tested in my environment and all tests passed.

@mkgrgis
Copy link
Contributor Author

mkgrgis commented Dec 27, 2023

Thanks, @nxhai98! I have no comments before merge of this PR as squashed commit.

All changes also applied to next PR #91 about int out of range.

@t-kataym
Copy link
Contributor

@nxhai98 , Thank you for your confirmation.
@mkgrgis , Thank you for your implementation.
I will merge changes into master.

@t-kataym t-kataym merged commit a387b2f into pgspider:master Dec 27, 2023
@mkgrgis mkgrgis deleted the bool_mixed_affinity_support branch December 27, 2023 07:52
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.

4 participants