Skip to content

Commit

Permalink
Minor: Fix Postgres Cypress Failure (#14698)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulixius9 authored Jan 13, 2024
1 parent 3265d2a commit 21a701f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,7 @@ def get_table_partition_details(
self, table_name: str, schema_name: str, inspector
) -> Tuple[bool, TablePartition]:
result = self.engine.execute(
POSTGRES_PARTITION_DETAILS.format(
table_name=table_name, schema_name=schema_name
)
POSTGRES_PARTITION_DETAILS, table_name=table_name, schema_name=schema_name
).all()
if result:
partition_details = TablePartition(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
col.table_schema = par.relnamespace::regnamespace::text
and col.table_name = par.relname
and ordinal_position = pt.column_index
where par.relname='{table_name}' and par.relnamespace::regnamespace::text='{schema_name}'
where par.relname=%(table_name)s and par.relnamespace::regnamespace::text=%(schema_name)s
"""
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ const clearQuery = 'select pg_stat_statements_reset()';
const selectQuery =
'SELECT * FROM sales.order_items oi INNER JOIN sales.orders o ON oi.order_id=o.order_id';

// @ayush - Need to fix postgres ingestion issue
describe.skip('Postgres Ingestion', () => {
describe('Postgres Ingestion', () => {
beforeEach(() => {
cy.login();
});

it('Trigger select query', () => {
cy.postgreSQL(clearQuery);
cy.wait(500);
cy.postgreSQL(selectQuery);
});

Expand Down Expand Up @@ -132,7 +132,7 @@ describe.skip('Postgres Ingestion', () => {

cy.get('#root\\/filterCondition')
.scrollIntoView()
.type(`s.query like '%%${tableName}%%'`);
.type(`lower(s.query) like '%%${tableName}%%'`);
cy.get('[data-testid="submit-btn"]')
.scrollIntoView()
.should('be.visible')
Expand Down

0 comments on commit 21a701f

Please sign in to comment.