Fix regenerate_sqlite_files.sh due to changes in sqllogictests#14881
Merged
jayzhan211 merged 1 commit intoapache:mainfrom Feb 26, 2025
Merged
Fix regenerate_sqlite_files.sh due to changes in sqllogictests#14881jayzhan211 merged 1 commit intoapache:mainfrom
regenerate_sqlite_files.sh due to changes in sqllogictests#14881jayzhan211 merged 1 commit intoapache:mainfrom
Conversation
alamb
commented
Feb 25, 2025
| @@ -0,0 +1,131 @@ | |||
| // Licensed to the Apache Software Foundation (ASF) under one | |||
Contributor
Author
There was a problem hiding this comment.
this is pretty brutal -- I edited these files so they compiled and then copied them to the regenerate location, similarly to how it is tone for the runner.rs
alamb
commented
Feb 25, 2025
| cp datafusion/sqllogictest/regenerate/sqllogictests.rs datafusion/sqllogictest/bin/sqllogictests.rs | ||
| # replace the sqllogictest.rs with a customized versions. | ||
| cp datafusion/sqllogictest/regenerate/sqllogictests.rs datafusion/sqllogictest/bin/sqllogictests.rs | ||
| cp datafusion/sqllogictest/regenerate/src/engines/postgres_engine/ datafusion/sqllogictest/src/engines/postgres_engine/mod.rs |
Contributor
Author
There was a problem hiding this comment.
two other files are now copied here...
Omega359
reviewed
Feb 25, 2025
Contributor
Author
|
I am still testing this locally |
bacbdfa to
b4bbb2b
Compare
Contributor
Author
|
Ok, I think this one now works again. |
Contributor
Author
|
@Omega359 has an alternate plan here potentially: #14824 (comment) |
jayzhan-synnada
approved these changes
Feb 26, 2025
jayzhan211
approved these changes
Feb 26, 2025
Contributor
|
Thanks @alamb, let me try it |
jayzhan211
reviewed
Feb 26, 2025
|
|
||
| ```shell | ||
| PG_URI=postgresql://postgres@localhost:5432/postgres bash datafusion/sqllogictest/regenerate_sqlite_files.sh | ||
| ``` |
Contributor
There was a problem hiding this comment.
postgresql://postgres@localhost:5432/postgres doesn't work for me.
Run with $(whoami) to find your name, and the command should be
PG_URI=postgres://$(whoami)@localhost:5432/{database} bash datafusion/sqllogictest/regenerate_sqlite_files.sh
And run this to find database
➜ datafusion git:(count-schema-name) ✗ psql -U jayzhan -h localhost -p 5432 -l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+---------+----------+---------+-------+---------------------
postgres | jayzhan | UTF8 | C | C |
template0 | jayzhan | UTF8 | C | C | =c/jayzhan +
| | | | | jayzhan=CTc/jayzhan
template1 | jayzhan | UTF8 | C | C | =c/jayzhan +
| | | | | jayzhan=CTc/jayzhan
(3 rows)
This works
PG_URI=postgres://jayzhan@localhost:5432/postgres bash datafusion/sqllogictest/regenerate_sqlite_files.sh
Contributor
There was a problem hiding this comment.
I just run postgres in docker:
docker run --name df_postgres -e POSTGRES_USER=test -e POSTGRES_PASSWORD=test -e POSTGRES_DB=test -d -p 5432:5432 postgres:latest
export PG_URI=postgres://test:[email protected]:5432/test
./datafusion/sqllogictest/regenerate_sqlite_files.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
The regeneration logic uses a fork of the sqllogictest runner. However, the runner has been updated on
mainand the fork hasn't been updated.This means we can't update the sqllogictest tests anymore , and we hit this when working with @jayzhan211 on #14824 (comment)
What changes are included in this PR?
regenerate_sqlite_files.shscriptAre these changes tested?
I tested them manually
Are there any user-facing changes?
No, this is a development only change
However, I think we need to come up with a more maintainable solution for maintaining these files
I'll file a ticket describing that need later