apache / apache/beam

[SQL] Improve Query Validation

Open
#18,637 0 comments 0 reactions 0 assignees View on GitHub
dsl improvement P3 sql
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
205

Description

In couple of places we don't validate the query and crash with some low-level non-informative exceptions.

For example, when there's different number of fields in SELECT than in the RowCoder of the result in PAssert, then we will throw EOF exception trying to decode the result, instead of providing meaningful description of what's wrong.

We need to implement additional validation in such cases.

Imported from Jira [BEAM-3712](https://issues.apache.org/jira/browse/BEAM-3712). Original Jira may contain additional context.
Reported by: kedin.

Contributor guide

Open the contributing guide

Research direction

Start with the SQL validation and PAssert/RowCoder paths described in the issue, using the mismatched SELECT-field and result-RowCoder example as the first case to trace. Done means this mismatch is validated before decoding and reports a meaningful query error instead of an EOF exception; consult BEAM-3712 for the imported context.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.