Skip to content

Add sqllogictest in ci to verify execution results against vanilla spark sql. #123

Closed

Description

@liurenjie1024

What is the problem the feature request solves?

sqllogictest is a commonly used data driven approach to verify query engine. We can use this to verify the results of comet are same as vanilla spark sql.

Describe the potential solution

No response

Additional context

No response

Activity

  1. added
    enhancement
    on Feb 27, 2024
  2. changed the title [-]Add sqllogictest to verify execution results against vanilla spark sql.[/-] [+]Add sqllogictest in ci to verify execution results against vanilla spark sql.[/+] on Feb 27, 2024
  3. liurenjie1024 commented on Feb 27, 2024

    @liurenjie1024
    Author

    I'm happy to take this is we have reached consensus on this.

  4. viirya commented on Feb 27, 2024

    @viirya
    Member

    Hmm, I guess the question is, how do you compare with Spark result in sqllogictest?

    For example, in current unit test or e2e test like CometTPCDSQuerySuite, we compare Comet query result with Spark result generated in runtime by disabling Comet or golden filed generated by Spark.

    But for sqllogictest, as I saw its usage in DataFusion, it works like comparing actual output with previous output (in sqllogictest file) to check output consistency. So it cannot be used to run Spark in runtime to get expected output.

  5. liurenjie1024 commented on Feb 27, 2024

    @liurenjie1024
    Author

    But for sqllogictest, as I saw its usage in DataFusion, it works like comparing actual output with expected output (in sqllogictest file). So it cannot be used to run Spark in runtime to get expected output.

    Why? We can use spark connect.

  6. viirya commented on Feb 27, 2024

    @viirya
    Member

    Why? We can use spark connect.

    Can sqllogictest run Spark connect? And how do you compare it in sqllogictest?

  7. liurenjie1024 commented on Feb 27, 2024

    @liurenjie1024
    Author

    Why? We can use spark connect.

    Can sqllogictest run Spark connect?

    There are two ways to do this:

    1. We can use sqllogictest as a library.
    2. We develop a test executor for sqllogictest.

    Please note that the link I provided is java's implementation of sqllogictest.

  8. liurenjie1024 commented on Feb 27, 2024

    @liurenjie1024
    Author

    And how do you compare it in sqllogictest?

    We just run the slt files against both vanilla spark and comet, and they both should be ok.

  9. viirya commented on Feb 27, 2024

    @viirya
    Member

    I'm not sure if this makes sense. I tend to think this doesn't make too much sense at this moment.

    • It is not something ready to use. As you said, we need to implement a sqllogictest test executor for Spark to talk to Spark connect. I think this makes thing complicated. For the test, we need Spark server, Spark connect client, sqllogictest text executor, sqllogictest... too many components which increase maintenance effort.
    • The slt files need to be run with both Spark and Comet. Although we have unit tests also doing like that, the number is limited.
    • We will soon have Spark test pipelines which cover Spark compatibility which leverage existing Spark tests. I think Spark test itself has most correct and highest coverage to make sure Comet's Spark compatibility. If there are very corner cases which are missing in Spark tests, I think these cases should be less. We probably can add the tests directly into Spark or just in Comet as unit test.
  10. liurenjie1024 commented on Feb 27, 2024

    @liurenjie1024
    Author

    Sounds reasonable, if we can port spark tests in this repo, it would be enough. Thanks for sharing!

  11. added 5 commits that reference this issue on Dec 13, 2025
    2044039
    ccc7b06
    b2ecb6c
    5ddbf67
    b240b1c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions