Skip to content

[Spark] Support TLP Oracle#1285

Open
codebreaker32 wants to merge 1 commit intosqlancer:mainfrom
codebreaker32:feat/spark-tlp
Open

[Spark] Support TLP Oracle#1285
codebreaker32 wants to merge 1 commit intosqlancer:mainfrom
codebreaker32:feat/spark-tlp

Conversation

@codebreaker32
Copy link

@codebreaker32 codebreaker32 commented Dec 7, 2025

This PR creates a basic framework for Spark SQL and uses the TLP oracle to test it via the Thrift Server.

  • Implemented JDBC connection to the Spark Thrift Server (using HiveServer2 protocol).

  • Implemented creating Spark tables (Parquet format) with basic column types (BOOLEAN, INT, DOUBLE, STRING, TIMESTAMP, DATE).

  • Implemented supported table constraint (NOT_NULL)

  • Implemented SELECT WHERE clause generation for the TLP

Inspired from #1201
Closes #1025
Ref:https://spark.apache.org/docs/latest/sql-ref.html

@mrigger

@codebreaker32
Copy link
Author

@mrigger Can you take a look?

Copy link
Contributor

@mrigger mrigger left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the PR and very sorry for the late review! This looks mostly great! Regarding the expected errors, there should be no syntax errors happening. Could you please check?

errors.add("is not a valid grouping expression");
errors.add("is not contained in either an aggregate function or the GROUP BY clause");
errors.add("PARSE_SYNTAX_ERROR");
errors.add("Syntax error");
Copy link
Contributor

Choose a reason for hiding this comment

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

Syntax errors should never happen. If they do, we should change the generators.

}

public enum Action implements AbstractAction<SparkGlobalState> {
INSERT(SparkInsertGenerator::getQuery); // You will need to create this class
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the comment is outdated.

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.

ask support for SparkSQL

2 participants