Skip to content

[docs](integration) Add SQLGlot conversion guide - #4738

Open
Ragnaroos wants to merge 1 commit into
apache:masterfrom
Ragnaroos:codex/sqlglot-doris-guide
Open

Ragnaroos wants to merge 1 commit into
apache:masterfrom
Ragnaroos:codex/sqlglot-doris-guide

Conversation

@Ragnaroos

Copy link
Copy Markdown
Contributor

Summary

Add a SQLGlot guide under Connection and Integration > Data Integration.
It helps users convert queries from PostgreSQL and other source dialects
to Doris SQL, and develop their own HTTP converter for Doris FE.

  • Add matching English and Chinese guides for current/dev.
  • Cover release/source installation, Python API and CLI conversion,
    error handling, and migration-result validation.
  • Provide a minimal FastAPI service following the Doris HTTP conversion
    protocol, with configuration, fallback, and production caveats.
  • Register the shared sidebar entry and add overview cards in both
    languages, using the unmodified logo from the official SQLGlot repo.
    The cards display its left-hand symbol using page-local CSS.

This documents a user-developed service. It does not introduce or operate
an Apache-hosted conversion service, or change Doris/SQLGlot behavior.

Scope and Version Notes

Current/dev only: this is a new third-party integration tutorial whose
HTTP contract was checked against the development implementation of
HttpDialectUtils and HttpDialectConverterPlugin. Released-version
support must be checked against the deployed Doris version; this PR does
not assert a minimum supported Doris release or backport the tutorial to
4.x/3.x. Existing versioned pages and managed translations are unchanged.

Validation

  • Parsed all four changed/new Markdown and MDX documents with the native
    MDX compiler; front matter and relative migration links are valid.
  • Verified all 21 Python, shell, SQL, and JSON example blocks are identical
    between the English and Chinese guides.
  • Executed both Python API examples and both CLI input modes against the
    pinned SQLGlot 30.35.0 release in an isolated virtual environment.
  • Executed 20 HTTP endpoint checks, covering health, valid conversion,
    all six allowlisted source dialects, malformed/empty/multiple queries,
    DDL/DML/SELECT INTO, and unsupported request fields and options.
  • All 37 documentation-governance unit tests passed.
  • Touched-page governance: no errors. Remaining warnings concern the
    unchanged Chinese overview description length and intentional
    current-only version scope; external links are report-only.
  • Checked the Chinese development preview, overview-card navigation,
    and official logo rendering in the browser.
  • git diff origin/master...HEAD --check passed after rebasing onto
    the latest master available at submission.

A full production site build and an end-to-end Doris FE HTTP integration
run were not performed locally. Website CI must validate the site build;
the guide explicitly asks users to verify their deployed Doris version.
The HTTP checks used FastAPI 0.165.0 and Pydantic 2.14.4.

Review and Risks

  • Goal: provide a complete local-conversion and HTTP-development guide.
  • Scope: six files, limited to the guide, its navigation, and logo asset.
  • Architecture: matching English/Chinese dev pages; version scope above
    explains the deliberately unchanged release documentation.
  • Navigation: preserve existing routes; add one shared document ID and
    overview links that resolve to the new page in each locale.
  • Frontend: no component/configuration changes or new colors; the local
    image rule preserves the existing 40px card-icon layout.
  • Validation: the checks and remaining build/integration limits are
    recorded above; no additional blocking issue found in self-review.
  • Compatibility: conversion can be incomplete and Doris may fall back to
    the original SQL. Both behaviors and operational risks are documented.

Versions

  • dev
  • 4.x
  • 3.x
  • 2.1 or older (not covered by version/language sync gate)

Languages

  • Chinese
  • English

Docs Checklist

  • Checked by AI
  • Test Cases Built
  • Updated required version and language counterparts, or explained why not
  • If only one language changed, confirmed whether source/translation counterparts need sync

The unchecked build item reflects the full-site build limitation above;
the executable guide examples and endpoint checks were run locally.

Document local SQL conversion and an HTTP converter example in English
and Chinese. Add a shared sidebar entry and integration overview cards
using the official SQLGlot logo.

Keep the tutorial in current/dev while the HTTP interface is reviewed
against the development implementation. Leave release-version docs
unchanged and describe conversion limits and validation requirements.

This branch has not been deployed

No deployments
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