apache / apache/arrow

[Format][FlightSQL] Add dialect-related SqlInfo codes (LIMIT/OFFSET syntax, NULLS ordering clause, boolean/datetime literals)

Open
#49,792 0 comments 0 reactions 1 assignee Claimed by @tokoko View on GitHub
Component: C++ Component: Format Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

The `SqlInfo` enum in `FlightSql.proto` already captures a useful slice of SQL dialect metadata (identifier quoting, null ordering default, supported grammar, etc.), but leaves several axes uncovered that clients routinely need when compiling SQL for a specific backend. Although it's unrealistic to describe entire dialect grammar with sqlinfo flags, the goal is to expose just enough flags that will allow query engines to generate correct pushdown sql queries (predicate pushdown, projection pushdown, ...). Since adbc also adopts the same SqlInfo flags in it's spec the changes naturally apply to both flight sql and adbc.

The immediate use case for these particular flags is to enable adbc data source (apache/spark#54603) in spark w/o having to pre-configure dialects in spark code like it's currently done with jdbc. The necessary identified codes so far are:
- `SQL_LIMIT_OFFSET_SYNTAX`
- `SQL_NULLS_ORDERING_SYNTAX`
- `SQL_BOOLEAN_LITERAL_SYNTAX`
- `SQL_DATETIME_LITERAL_SYNTAX`

### Component(s)

Format, C++

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.