Skip to content

Conversation

@LantaoJin
Copy link
Member

@LantaoJin LantaoJin commented Nov 12, 2025

Description

  • Translate SAFE_CAST to TRY_CAST in Spark SQL
  • Fix the bug of translation MAX_BY and MIN_BY functions in Spark SQL

Related Issues

Resolves #4778

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Lantao Jin <ltjin@amazon.com>
@LantaoJin LantaoJin changed the title Translate SAFE_CAST to TRY_CAST in Spark SQL Translate SAFE_CAST to TRY_CAST in Spark SQL Nov 12, 2025
@LantaoJin LantaoJin marked this pull request as ready for review November 12, 2025 09:10
"ARG_MAX", "MAX_BY",
"SAFE_CAST", "TRY_CAST");

private static final Map<String, String> CALL_SEPARATOR = ImmutableMap.of("SAFE_CAST", "AS");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] ARGUMENT_SEPARATOR might be a better name

@LantaoJin LantaoJin merged commit b5fe1c1 into opensearch-project:main Nov 12, 2025
38 of 45 checks passed
@LantaoJin LantaoJin deleted the pr/issues/4778 branch November 12, 2025 10:23
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 12, 2025
Signed-off-by: Lantao Jin <ltjin@amazon.com>
(cherry picked from commit b5fe1c1)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
LantaoJin pushed a commit that referenced this pull request Nov 12, 2025
(cherry picked from commit b5fe1c1)

Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
asifabashar pushed a commit to asifabashar/sql that referenced this pull request Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] SAFE_CAST function is not translated to Spark-compatible cast

3 participants