Skip to content

feat: share schema type category helpers - #792

Merged
ilyabo merged 10 commits into
mainfrom
codex/shared-schema-type-categories
Jul 3, 2026
Merged

ilyabo merged 10 commits into
mainfrom
codex/shared-schema-type-categories

Conversation

@ilyabo

@ilyabo ilyabo commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add shared @sqlrooms/duckdb-core semantic column category helpers and selector-facing predicates
  • re-export the helpers through @sqlrooms/duckdb and document the public API
  • update Deck and Mosaic schema/type adapters to classify by shared categories before mapping to selector-compatible strings or Arrow fields

Stacked on

Validation

  • pnpm --filter @sqlrooms/duckdb-core typecheck
  • pnpm --filter @sqlrooms/duckdb-core test
  • pnpm --filter @sqlrooms/duckdb typecheck
  • pnpm --filter @sqlrooms/deck typecheck
  • pnpm --filter @sqlrooms/deck test -- useDeckMapDatasetSchema.test.ts
  • pnpm --filter @sqlrooms/mosaic typecheck
  • pnpm --filter @sqlrooms/mosaic test -- data-table-explorer.utils.test.ts
  • pre-push hook: knip, turbo typecheck, circular dependency check, turbo test

@coderabbitai

coderabbitai Bot commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ilyabo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 14 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d3d6630c-1e2c-49e1-bc5d-be873f5a2610

📥 Commits

Reviewing files that changed from the base of the PR and between ba5178e and 76ab3c5.

📒 Files selected for processing (10)
  • packages/deck/__tests__/useDeckMapDatasetSchema.test.ts
  • packages/deck/src/useDeckMapDatasetSchema.ts
  • packages/duckdb-core/README.md
  • packages/duckdb-core/__tests__/typeCategories.test.ts
  • packages/duckdb-core/src/index.ts
  • packages/duckdb-core/src/schema-tree/typeCategories.ts
  • packages/duckdb/src/index.ts
  • packages/mosaic/__tests__/data-table-explorer.utils.test.ts
  • packages/mosaic/src/column-types-utils.ts
  • packages/mosaic/src/data-table-explorer/utils.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/shared-schema-type-categories

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ilyabo
ilyabo marked this pull request as ready for review July 3, 2026 16:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 871b1ebf8d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +148 to +150
export function isColumnQuantitative(column: ColumnTypeLike): boolean {
const category = getColumnTypeCategory(column);
return category === 'number' || category === 'datetime';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve BIT as a quantitative type

For DuckDB BIT/BIT(...) columns, getColumnTypeCategory returns string because the category table still matches ^bit under strings, while isColumnNumeric special-cases the same type as numeric. Since isColumnQuantitative only checks the category, isQuantitativeType('BIT') in mosaic now returns false even though BIT is still listed in QUANTITATIVE_COLUMN_TYPES, so existing BIT-backed histogram fields or line-chart X fields are rejected by validation after this change.

Useful? React with 👍 / 👎.

Base automatically changed from codex/generated-column-map-selector to main July 3, 2026 16:34
@ilyabo
ilyabo merged commit 19007f9 into main Jul 3, 2026
3 checks passed
@ilyabo
ilyabo deleted the codex/shared-schema-type-categories branch July 3, 2026 16:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b29295a72e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +41 to +45
/^timestamp$/,
/^timestamp_s$/,
/^timestamp_ms$/,
/^timestamp_ns$/,
/^timestamptz$/,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve timezone timestamps as temporal

When DuckDB/MotherDuck field metadata uses the canonical TIMESTAMP WITH TIME ZONE spelling for a TIMESTAMPTZ column, none of these exact timestamp patterns match. This regresses the previous DataTableExplorer mapping (/^timestamp/ matched that value): fieldInfoToDataTableExplorerField now falls through to Utf8, so timezone timestamp columns are summarized and filtered as strings instead of date histograms.

Useful? React with 👍 / 👎.

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.

1 participant