Skip to content

Add Spark cast mode special form registration#17687

Open
ReemaAlzaid wants to merge 1 commit into
facebookincubator:mainfrom
ReemaAlzaid:spark-cast-mode-special-forms
Open

Add Spark cast mode special form registration#17687
ReemaAlzaid wants to merge 1 commit into
facebookincubator:mainfrom
ReemaAlzaid:spark-cast-mode-special-forms

Conversation

@ReemaAlzaid
Copy link
Copy Markdown
Collaborator

Summary

  • Add registration support for Spark ANSI and legacy cast mode special forms.
  • Introduce cast mode specific special form adapters that construct SparkCastExpr with the correct try-cast and overflow behavior.
  • Expose isAnsiSupported so ANSI cast handling can fall back for unsupported cast pairs.

related PR: apache/gluten#12051

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 1, 2026

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 7ad9857
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/6a1dc8beacb8070008957d26

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Build Impact Analysis

Selective Build Targets (building these covers all 21 affected)

cmake --build _build/release --target spark_expression_fuzzer_test velox_date_extract_benchmark velox_expression_runner_test velox_expression_runner_unit_test velox_functions_spark_aggregates_test velox_functions_spark_test velox_spark_function_registry_test velox_spark_query_runner_test velox_sparksql_benchmarks_cast velox_sparksql_benchmarks_compare velox_sparksql_benchmarks_from_json velox_sparksql_benchmarks_get_funcs velox_sparksql_benchmarks_hash velox_sparksql_benchmarks_in velox_sparksql_benchmarks_simd_compare velox_sparksql_benchmarks_split velox_sparksql_coverage

Total affected: 21/580 targets

Affected targets (21)

Directly changed (2)

Target Changed Files
velox_functions_spark SparkCastExpr.h
velox_functions_spark_specialforms SparkCastExpr.cpp, SparkCastExpr.h

Transitively affected (19)

  • spark_expression_fuzzer_test
  • velox_date_extract_benchmark
  • velox_expression_runner
  • velox_expression_runner_test
  • velox_expression_runner_unit_test
  • velox_functions_spark_aggregates_test
  • velox_functions_spark_impl
  • velox_functions_spark_test
  • velox_spark_function_registry_test
  • velox_spark_query_runner_test
  • velox_sparksql_benchmarks_cast
  • velox_sparksql_benchmarks_compare
  • velox_sparksql_benchmarks_from_json
  • velox_sparksql_benchmarks_get_funcs
  • velox_sparksql_benchmarks_hash
  • velox_sparksql_benchmarks_in
  • velox_sparksql_benchmarks_simd_compare
  • velox_sparksql_benchmarks_split
  • velox_sparksql_coverage

Fast path • Graph from main@70256ffc69a3077c68079822d3d2b37f0c88cf8c

Copy link
Copy Markdown
Collaborator

@rui-mo rui-mo left a comment

Choose a reason for hiding this comment

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

Please add tests and update relevant documentations. Thanks.

Also FYI: https://github.com/facebookincubator/velox/blob/main/scripts/review/SELF_REVIEW.md

const core::QueryConfig& config) override;
};

void registerSparkCastModeSpecialForms(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Currently no call site wires it into registration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants