Skip to content

[SPARK-2050 - 2][SQL] DIV and BETWEEN should not be case sensitive. - #994

Closed
marmbrus wants to merge 1 commit into
apache:masterfrom
marmbrus:caseSensitiveFunctions2
Closed

marmbrus wants to merge 1 commit into
apache:masterfrom
marmbrus:caseSensitiveFunctions2

Conversation

@marmbrus

@marmbrus marmbrus commented Jun 6, 2014

Copy link
Copy Markdown
Contributor

Followup: #989

@AmplabJenkins

Copy link
Copy Markdown

Merged build triggered.

@rxin

rxin commented Jun 6, 2014

Copy link
Copy Markdown
Contributor

LGTM

@AmplabJenkins

Copy link
Copy Markdown

Merged build started.

@AmplabJenkins

Copy link
Copy Markdown

Merged build finished.

@AmplabJenkins

Copy link
Copy Markdown

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15500/

@marmbrus

marmbrus commented Jun 6, 2014

Copy link
Copy Markdown
Contributor Author

test this please

@AmplabJenkins

Copy link
Copy Markdown

Merged build triggered.

@AmplabJenkins

Copy link
Copy Markdown

Merged build started.

@AmplabJenkins

Copy link
Copy Markdown

Merged build finished. All automated tests passed.

@AmplabJenkins

Copy link
Copy Markdown

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15510/

@asfgit asfgit closed this in 8d21056 Jun 6, 2014
@marmbrus

marmbrus commented Jun 6, 2014

Copy link
Copy Markdown
Contributor Author

Merged into master and 1.0. Thanks for the review @rxin.

asfgit pushed a commit that referenced this pull request Jun 6, 2014
Followup: #989

Author: Michael Armbrust <michael@databricks.com>

Closes #994 from marmbrus/caseSensitiveFunctions2 and squashes the following commits:

9d9c8ed [Michael Armbrust] Fix DIV and BETWEEN.

(cherry picked from commit 8d21056)
Signed-off-by: Michael Armbrust <michael@databricks.com>
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
Followup: apache#989

Author: Michael Armbrust <michael@databricks.com>

Closes apache#994 from marmbrus/caseSensitiveFunctions2 and squashes the following commits:

9d9c8ed [Michael Armbrust] Fix DIV and BETWEEN.
@marmbrus
marmbrus deleted the caseSensitiveFunctions2 branch July 8, 2014 22:49
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
Followup: apache#989

Author: Michael Armbrust <michael@databricks.com>

Closes apache#994 from marmbrus/caseSensitiveFunctions2 and squashes the following commits:

9d9c8ed [Michael Armbrust] Fix DIV and BETWEEN.
wangyum pushed a commit that referenced this pull request May 26, 2023
* [CARMEL-5818] Support analyze event log command

* ensure the command running in test
udaynpusa pushed a commit to mapr/spark that referenced this pull request Jan 30, 2024
…url (apache#994)

Co-authored-by: Tetiana Fioshkina <tetiana.fioshkina@hpe.com>
udaynpusa pushed a commit to mapr/spark that referenced this pull request Jan 30, 2024
…url (apache#994)

Co-authored-by: Tetiana Fioshkina <tetiana.fioshkina@hpe.com>
mapr-devops pushed a commit to mapr/spark that referenced this pull request May 8, 2025
…url (apache#994)

Co-authored-by: Tetiana Fioshkina <tetiana.fioshkina@hpe.com>
MaxGekk added a commit to MaxGekk/spark that referenced this pull request Oct 23, 2026
… types taught (apache#994)

Stacked on apache#992 (the plan cites its review record, `VARKA-329.md` 9.8): until that merges, this diff includes its commit. The change of this pull request is `4070af62bd7`, two plan files.

### What changes were proposed in this pull request?

The plan for Varka's type architecture (`VARKA-475.md`) was written before the `TINYINT`/`SMALLINT` lanes and their arithmetic merged and were reviewed. Those reviews showed where adding a type actually goes wrong, and the plan is revised to match:

- **The conformance contract comes first.** Most defects the reviews found were in hand-written test fixtures: no row with a narrow pair null on one side only, a "no nulls" fixture that held nulls, equality rows that no fixture row could make true. The contract now generates each type's fixtures from its values (extremes, every null pattern of a pair, equal pairs, a null-free batch), and three types that have already landed must pass it before a new type depends on it.
- **The register checks come second.** `casts.tsv` and `census.tsv` already drift from the compiler: the census's fused-cast list missed byte and short to int until the pre-commit hook caught it.
- **A new piece: a kernel plan.** Today the compiler's admission, the budget mirror, the emitter and the compiled projection each work out a kernel's lane, and in three review findings they disagreed. A `VarkaKernelPlan`, built once per kernel, would hold the drive lane, each input's load, each node's emitted lane, the reduction sites and the refusals, and all four would read it. It is scheduled before `TIMESTAMP_NTZ`, the first type whose semantics cross a lane boundary.
- **The registry is narrowed** to the fields that have a reader today: the admission answer whose decline names the type, the census name, and the species a type reaches, which the warm-up reach model would read instead of restating.
- **`ValueShape` stays `ONE` and `PAIR`** until a row builds another shape. The shape switches are exhaustive, so adding a member later costs only the compile errors it raises.
- **Rules for a new type's diff:** operators rather than new IR nodes (a node costs about twenty files), lane facts rather than `isNarrow()` branches, alternative representations kept as option arms, and the warm-up following the registry.

The row's text in `PLAN.md` is updated to match.

### Why are the changes needed?

Four of the milestone's seven types are still ahead. The plan scheduled the registry first, but the narrow types' defects came mostly from fixtures and from the lane being decided in four places. Fixing those first keeps the same mistakes out of `TIMESTAMP_NTZ`, `DOUBLE`, `FLOAT` and `DECIMAL`.

### Does this PR introduce _any_ user-facing change?

No. Plan documents only.

### How was this patch tested?

The plan linter (`dev/varka_plan_lint.py`) and the pre-commit hook report no findings.

### Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5.5)
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.

3 participants