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

Avoid populating _schema if the collection is empty in MongoDB connector #21236

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

build2create
Copy link
Contributor

@build2create build2create commented Mar 25, 2024

Description

This PR is to fix the [issue][1]. Whenever a empty collection was created an entry was populated in default collection _schema. Further upon populating the collection with documents the fields in _schema remained empty. So a workaround there is a check introduced to avoid populating _schema if collection is empty.

Fixes #20972

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

Copy link

cla-bot bot commented Mar 25, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Mithilesh Wachasunder.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

Copy link

cla-bot bot commented Apr 1, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Mithilesh Wachasunder.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@github-actions github-actions bot added release-notes docs tests:hive iceberg Iceberg connector delta-lake Delta Lake connector hive Hive connector bigquery BigQuery connector labels Apr 1, 2024
@build2create build2create marked this pull request as draft April 1, 2024 06:50
Copy link

cla-bot bot commented Apr 1, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Mithilesh Wachasunder.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@build2create build2create marked this pull request as ready for review April 1, 2024 06:51
@ebyhr
Copy link
Member

ebyhr commented Apr 4, 2024

@cla-bot check

Copy link

cla-bot bot commented Apr 4, 2024

The cla-bot has been summoned, and re-checked this pull request!

@mosabua
Copy link
Member

mosabua commented May 10, 2024

👋 @build2create - are you still interested in progressing this PR? If yes, could you address the comments from @ebyhr and fix any build failures?

@github-actions github-actions bot removed the stale label May 13, 2024
@github-actions github-actions bot added the stale label Jun 4, 2024
@build2create
Copy link
Contributor Author

are you still interested in progressing this PR? If yes, could you address the comments from @ebyhr and fix any build failures?

Yes sorry its been a while will resume on this. Based on the offline chat with @ebyhr seems like a different behaviour with Mongo Compass and Java Client so the test results are different.

@github-actions github-actions bot removed the stale label Jun 11, 2024
Copy link

github-actions bot commented Jul 9, 2024

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Jul 9, 2024
Copy link

Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.

@github-actions github-actions bot closed this Jul 30, 2024
@mosabua mosabua reopened this Jul 31, 2024
@mosabua
Copy link
Member

mosabua commented Jul 31, 2024

I think @build2create and @ebyhr are going to continue here .. even if slowly. So I am adding the stale-ignore label.

@mosabua mosabua added stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed. and removed stale labels Jul 31, 2024
@ebyhr
Copy link
Member

ebyhr commented Oct 2, 2024

@cla-bot check

Copy link

cla-bot bot commented Oct 2, 2024

The cla-bot has been summoned, and re-checked this pull request!

@cla-bot cla-bot bot added the cla-signed label Oct 2, 2024
@trinodb trinodb deleted a comment from cla-bot bot Oct 3, 2024
@trinodb trinodb deleted a comment from github-actions bot Oct 3, 2024
@trinodb trinodb deleted a comment from github-actions bot Oct 3, 2024
@trinodb trinodb deleted a comment from cla-bot bot Oct 3, 2024
Copy link
Member

@ebyhr ebyhr left a comment

Choose a reason for hiding this comment

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

Let's add a test in follow-up once we find a way to simulate the scenario with Java client.

@ebyhr ebyhr merged commit 1e0581f into trinodb:master Oct 3, 2024
44 checks passed
@github-actions github-actions bot added this to the 460 milestone Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery BigQuery connector cla-signed delta-lake Delta Lake connector docs hive Hive connector iceberg Iceberg connector mongodb MongoDB connector release-notes stale-ignore Use this label on PRs that should be ignored by the stale bot so they are not flagged or closed.
Development

Successfully merging this pull request may close these issues.

Don't populate _schema if the collection is empty in MongoDB connector
4 participants