rikirolly opened a new issue, #23982:
URL: https://github.com/apache/superset/issues/23982

   Creating a dataset from a Trino table I get this error:
   ```
       sql = database.compile_sqla_query(qry)
     File "/app/superset/models/core.py", line 568, in compile_sqla_query
       sql = str(qry.compile(engine, compile_kwargs={"literal_binds": True}))
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", 
line 494, in compile
       return self._compiler(dialect, **kw)
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", 
line 558, in _compiler
       return dialect.statement_compiler(dialect, self, **kw)
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 776, in __init__
       Compiled.__init__(self, dialect, statement, **kwargs)
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 451, in __init__
       self.string = self.process(self.statement, **compile_kwargs)
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 486, in process
       return obj._compiler_dispatch(self, **kwargs)
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/visitors.py", 
line 82, in _compiler_dispatch
       return meth(self, **kw)
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 3405, in visit_select
       text = self._compose_select_body(
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 3563, in _compose_select_body
       t = self._generate_delimited_and_list(
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 1705, in _generate_delimited_and_list
       return separator.join(
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 1705, in <genexpr>
       return separator.join(
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 1707, in <genexpr>
       for s in (c._compiler_dispatch(self, **kw) for c in clauses)
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/visitors.py", 
line 82, in _compiler_dispatch
       return meth(self, **kw)
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 2202, in visit_binary
       return self._generate_generic_binary(
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 2258, in _generate_generic_binary
       + binary.right._compiler_dispatch(
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/visitors.py", 
line 82, in _compiler_dispatch
       return meth(self, **kw)
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 2438, in visit_bindparam
       ret = self.render_literal_bindparam(
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 2537, in render_literal_bindparam
       return self.render_literal_value(value, bindparam.type)
     File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/compiler.py", 
line 2554, in render_literal_value
       raise NotImplementedError(
   NotImplementedError: Don't know how to literal-quote value 
datetime.date(2023, 5, 4)
   ```
   
   #### How to reproduce the bug
   Probably just creating a dataset starting from a Trino table with a 
datetime.date column.
   In my case this column is also a partition.
   
   ### Expected results
   
   Correctly create the dataset.
   
   ### Actual results
   
   Superset report the error:
   _Unable to load columns for the selected table. Please select a different 
table._
   
   #### Screenshots
   
   
![image](https://user-images.githubusercontent.com/1200467/237026045-1d1f34aa-cf59-4a4e-b0fc-9a31607db788.png)
   
   
   ### Environment
   
   - Chrome Version: `111.0.5563.146 (Official Build) (64-bit)`
   - Superset Version: `2.1.0`
   - Superset HelmChart repo: `https://apache.github.io/superset`
   - Superset HelmChart repo Version: `0.9.2`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   I have already created different dataset in the same format and always 
worked correctly, I do not know if this could be a new bug of the latest 
release.
   


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