Skip to content

Commit

Permalink
Draft for failing testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsrnhld committed Feb 25, 2025
1 parent 41a0c1d commit c34920a
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ public PortgresTestcontainerContextProvider() {
@Getter
private static class RemotePostgresContextProvider implements TestContextProvider {

private final static String PORT = Objects.requireNonNullElse(System.getenv("CONQUERY_SQL_PORT"), "39041");
private final static String HOST = System.getenv("CONQUERY_SQL_HOST");
private final static String DATABASE = System.getenv("CONQUERY_SQL_DATABASE");
private final static String PORT = Objects.requireNonNullElse(System.getenv("CONQUERY_SQL_PORT"), "5432");
private final static String HOST = Objects.requireNonNullElse(System.getenv("CONQUERY_SQL_HOST"), "localhost");
private final static String DATABASE = Objects.requireNonNullElse(System.getenv("CONQUERY_SQL_DATABASE"), DATABASE_NAME);
private final static String CONNECTION_URL = "jdbc:postgresql://%s:%s/%s".formatted(HOST, PORT, DATABASE);
private final static String USERNAME = System.getenv("CONQUERY_SQL_USER");
private final static String PASSWORD = System.getenv("CONQUERY_SQL_PASSWORD");
private final static String USERNAME = Objects.requireNonNullElse(System.getenv("CONQUERY_SQL_USER"), PostgreSqlIntegrationTests.USERNAME);
private final static String PASSWORD = Objects.requireNonNullElse(System.getenv("CONQUERY_SQL_PASSWORD"), PostgreSqlIntegrationTests.PASSWORD);
private final DSLContextWrapper dslContextWrapper;
private final DatabaseConfig databaseConfig;
private final TestSqlConnectorConfig sqlConnectorConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pid,datum_start,datum_end
2,2014-06-30,2015-06-30
2,2014-06-30,2015-06-30
5,2014-06-30,2015-06-30
5,2014-06-30,2015-06-30
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,39 @@
"type": "CONCEPT",
"tables": [
{
"id": "concept.connector",
"selects": "concept.connector.exists"
"id": "concept.connector_1",
"selects": "concept.connector_1.exists"
},
{
"id": "concept.connector_2",
"selects": "concept.connector_2.exists"
}
]
],
"selects": "concept.exists"
}
},
"concepts": [
{
"name": "concept",
"type": "TREE",
"selects": [
{
"type": "EXISTS",
"name": "exists"
}
],
"connectors": [
{
"label": "connector",
"table": "exists_table",
"label": "connector_1",
"table": "exists_table_1",
"selects": {
"type": "EXISTS",
"name": "exists"
}
},
{
"label": "connector_2",
"table": "exists_table_2",
"selects": {
"type": "EXISTS",
"name": "exists"
Expand All @@ -39,8 +58,26 @@
"content": {
"tables": [
{
"csv": "tests/sql/selects/exists/exists_on_connector/content.csv",
"name": "exists_table",
"csv": "tests/sql/selects/exists/exists_on_connector/content_1.csv",
"name": "exists_table_1",
"primaryColumn": {
"name": "pid",
"type": "STRING"
},
"columns": [
{
"name": "datum_start",
"type": "DATE"
},
{
"name": "datum_end",
"type": "DATE"
}
]
},
{
"csv": "tests/sql/selects/exists/exists_on_connector/content_2.csv",
"name": "exists_table_2",
"primaryColumn": {
"name": "pid",
"type": "STRING"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
result,dates,concept exists
2,{},1
4,{},1
3,{},1
5,{},1
1,{},1
result,dates,concept exists,concept exists_1
2,{},1,1
4,{},1,1
3,{},1,1
5,{},1,1
1,{},1,1

0 comments on commit c34920a

Please sign in to comment.