Skip to content

return empty when table or databse is not set #932

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OhJuhun
Copy link

@OhJuhun OhJuhun commented Jun 16, 2025

resolve: #931
This situation should not return an error; if nothing is selected, it would be appropriate to return an empty value and handle it as normal. Please let me know if you have any other opinions.

Copy link

changeset-bot bot commented Jun 16, 2025

⚠️ No Changeset found

Latest commit: 9d4454a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jun 16, 2025

@OhJuhun is attempting to deploy a commit to the HyperDX Team on Vercel.

A member of the Team first needs to authorize it.

@knudtty knudtty changed the base branch from v2 to main June 20, 2025 02:28
Copy link
Contributor

@knudtty knudtty 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 bringing this up and raising a PR! Unfortunately I still see the error that I think you're describing. I have a few changes I'd want to see

  1. Base off of the main branch (you can just hit the 'Update Branch' button on this PR). We recently merged v2 into main, and main is the primary target for PRs now
  2. I think the issue originates from metadata queries, specifically the getColumns method. In packages/common-utils/src/metadata.ts, add this database & table truthiness check like you have, but just return an empty array in those cases. You can add it to other similar metadata methods too (getAllFields, getKeyValues, etc.) and I believe that should future-proof us from introducing similar issues

Thanks for identifying this issue that rightly needs fixing!

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.

2 participants