shengbinxu commented on issue #28145:
URL: https://github.com/apache/superset/issues/28145#issuecomment-2401065379

   > > I patched the file with this attached patch and I was able to get it 
working. I think this is a hack, but it's got me past the problem.
   > > filename: sql_parse.patch
   > > ```
   > > diff --git a/sql_parse.py b/sql_parse.py
   > > index 62a2457..ceba521 100644
   > > --- a/sql_parse.py
   > > +++ b/sql_parse.py
   > > @@ -514,7 +514,7 @@ class ParsedQuery:
   > >          return self._parsed[0].get_type() == "UNKNOWN"
   > >  
   > >      def stripped(self) -> str:
   > > -        return self.sql.strip(" \t\r\n;")
   > > +        return str(self.sql).strip(" \t\r\n;")
   > >  
   > >      def strip_comments(self) -> str:
   > >          return sqlparse.format(self.stripped(), strip_comments=True)
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > I applied it as follows:
   > > ```
   > > cd /app/superset/ &&patch sql_parse.py < sql_parse.patch
   > > ```
   > 
   > This also worked for us but we just linked an edited version back into the 
container. Thanks
   
   
   If you installed Superset using Docker Compose, you can follow these steps:
   
   1. Use the command `docker exec -it 5e7f2e42f256 bash` to enter the 
container.
   2. Modify the code as per the instructions above.
   3. Run `docker restart 5e7f2e42f256` to restart the container.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to