OHDSI / WebAPI

OHDSI WebAPI contains all OHDSI services that can be called from OHDSI applications
Apache License 2.0
126 stars 156 forks source link

Fix heracles 200 for spark #2267

Closed TomWhite-MedStar closed 1 year ago

TomWhite-MedStar commented 1 year ago

@chrisknoll , This is further fix for #2257

The root cause may to be a "greedy" regex operator in SqlRender for Spark; but this fix ensures that the final semicolon is not trapped behind a single-line comment.

TomWhite-MedStar commented 1 year ago

I tested the original #2257 WebAPI patch on our local instance, and it also dropped the terminal semicolon (so blended together queries 200 and 500). The attached query renders correctly in https://data.ohdsi.org/SqlDeveloper/

chrisknoll commented 1 year ago

Thank you. The regex replaces in SqlRender is something we need to be careful about. Thanks for finding the issue and providing a fix.

TomWhite-MedStar commented 1 year ago

@chrisknoll and @konstjar - I tested Full Analysis on DataBricks using this patch. The run completes without error, and all of the generated analyses behave as expected. Thanks!