Skip to content

Comments

Fix for incorrect nullable setting on NOT NULL columns#23577

Merged
tdcmeehan merged 1 commit intoprestodb:masterfrom
NaveenNitturu:fix_column_nullable
Sep 13, 2024
Merged

Fix for incorrect nullable setting on NOT NULL columns#23577
tdcmeehan merged 1 commit intoprestodb:masterfrom
NaveenNitturu:fix_column_nullable

Conversation

@NaveenNitturu
Copy link
Contributor

@NaveenNitturu NaveenNitturu commented Sep 3, 2024

Description

The Information schema was returning NULLABLE as YES irrespective of what is been set actually while creating the table.
This PR will fetch the columns details (is NULLABLE ?) details based on how the table was created.

Motivation and Context

This change is essential to address a specific issue on the information schema tables. The problem revolves around the occurrence of default YES in NULLABLE field while querying the information.schema tables to get the metadata details.

Impact

Added fix to fetch the columns details (is NULLABLE ?) details based on how the table was created.

Test Plan

Tested the fix by creating a table having column with NULLABLE and NOT NULLABLE columns.
Tried querying the metadata of the table from the information schema and the details were populated correctly.
Before Fix:
Screenshot 2024-09-03 at 11 57 04 PM

After Fix:
Screenshot 2024-09-04 at 12 00 02 AM

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

Information Schema

* Fix nullability of columns in information schema :pr:`23577`

@NaveenNitturu NaveenNitturu requested a review from a team as a code owner September 3, 2024 18:46
@tdcmeehan tdcmeehan requested review from presto-oss and removed request for dtolnay September 3, 2024 19:05
@tdcmeehan
Copy link
Contributor

Can you add a test for this?

Copy link
Contributor

@rschlussel rschlussel left a comment

Choose a reason for hiding this comment

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

Thanks for this fix! Can you add a test?

@NaveenNitturu
Copy link
Contributor Author

NaveenNitturu commented Sep 5, 2024

Thanks for this fix! Can you add a test?

Added test, Could you please review now.

@tdcmeehan
Copy link
Contributor

Looks good, please clean up commit message

Fix nullability of columns in information schema

@tdcmeehan tdcmeehan self-assigned this Sep 6, 2024
@NaveenNitturu
Copy link
Contributor Author

Looks good, please clean up commit message

Fix nullability of columns in information schema

The commit message has been cleaned up, Could you please review now.

@tdcmeehan tdcmeehan merged commit 7c2993f into prestodb:master Sep 13, 2024
@jaystarshot jaystarshot mentioned this pull request Nov 1, 2024
25 tasks
@tdcmeehan tdcmeehan added the from:IBM PR from IBM label Dec 13, 2024
@prestodb-ci prestodb-ci requested review from a team, Dilli-Babu-Godari and ShahimSharafudeen and removed request for a team December 13, 2024 15:20
@prestodb-ci
Copy link
Contributor

Saved that user @NaveenNitturu is from IBM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:IBM PR from IBM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants