Docs: Add an example to clarify semantic analysis (#739)

This commit is contained in:
Andrew Lamb 2022-11-30 13:24:13 -05:00 committed by GitHub
parent e22aa78315
commit b17c44a64a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,9 +14,16 @@ foundation for vendor-specific parsers.
This parser is currently being used by the [DataFusion] query engine,
[LocustDB], [Ballista] and [GlueSQL].
This parser is used as a syntax analyzer. We don't intend to have more semantic logic because it varies drastically
between dialects, the same is true for projects like compilers. If you want to do semantic analysis, feel free to use
this project as a base
This crate provides only a syntax parser, and tries to avoid applying
any SQL semantics, and accepts queries that specific databases would
reject, even when using that Database's specific `Dialect`. For
example, `CREATE TABLE(x int, x int)` is accepted by this crate, even
though most SQL engines will reject this statement due to the repeated
column name `x`.
This crate avoids semantic analysis because it varies drastically
between dialects and implementations. If you want to do semantic
analysis, feel free to use this project as a base
## Example