-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix regenerate_sqlite_files.sh
due to changes in sqllogictests
#14881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -0,0 +1,131 @@ | |||
// Licensed to the Apache Software Foundation (ASF) under one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two other files are now copied here...
I am still testing this locally |
bacbdfa
to
b4bbb2b
Compare
Ok, I think this one now works again. |
@Omega359 has an alternate plan here potentially: #14824 (comment) |
Thanks @alamb, let me try it |
|
||
```shell | ||
PG_URI=postgresql://postgres@localhost:5432/postgres bash datafusion/sqllogictest/regenerate_sqlite_files.sh | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:test@host.docker.internal:5432/test
./datafusion/sqllogictest/regenerate_sqlite_files.sh
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
main
and 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.sh
scriptAre 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