Skip to content

Commit

Permalink
Add ASSERT condition for operand typeids
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-shameem committed Mar 5, 2025
1 parent 1ad0877 commit 50be1d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/babelfishpg_tsql/src/collation.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ transform_from_ci_as_for_likenode(Node *node, OpExpr *op, like_ilike_info_t like
if (!OidIsValid(database_or_server_collation_oid))
return node;

Assert(ltypeId == rtypeId);
/*
* Find the CS_AS collation corresponding to the CI_AS collation
* Change the collation of the ILIKE op to the CS_AS collation
Expand Down Expand Up @@ -435,6 +434,8 @@ transform_from_ci_as_for_likenode(Node *node, OpExpr *op, like_ilike_info_t like

prefix_collate = create_collate_expr((Node* ) prefix, coll_info_of_inputcollid.oid);

Assert(ltypeId == rtypeId);

/*
* If we found an exact-match pattern, generate an "=" indexqual.
*/
Expand Down

0 comments on commit 50be1d2

Please sign in to comment.