tanishqgandhi1908 commented on code in PR #7789:
URL: https://github.com/apache/texera/pull/7789#discussion_r3825657603


##########
sql/updates/36.sql:
##########
@@ -80,22 +92,26 @@ BEGIN
                         op,
                         '{operatorProperties,fileName}',
                         CASE
-                            WHEN f.fn IS NOT NULL AND left(f.fn, 10) <> 
'/datasets/'
+                            WHEN f.fn ~ '^/(dataset|model)s/'
+                            THEN to_jsonb(regexp_replace(f.fn, 
'^/(dataset|model)s/', '/\1/'))

Review Comment:
   Good catch — fixed. Reproduced it first: both /datasets/imdb/movies.csv and 
/datasets/imdb/raw/movies.csv were being rewritten, and resolve does try 
localResolveFunc first, so those would have silently stopped resolving.
   
   Applied your guard at all six sites — the four CASE arms and both WHERE 
predicates, owner/name at parts 2 and 3 — and dropped model for the ordering 
reason you gave.
   
   Two intentional side effects: a plural path whose dataset no longer exists 
now stays plural (it can't resolve either way, so nothing changes in practice), 
and /models/ paths are untouched.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to