cccs-tom commented on code in PR #23852:
URL: https://github.com/apache/superset/pull/23852#discussion_r1183819485


##########
superset/sql_validators/trino.py:
##########
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from typing import Type
+
+from superset.sql_validators.presto_db import PrestoDBSQLValidator

Review Comment:
   Unfortunately I haven't had a chance to test this (and I'm on a task 
unrelated to Trino, so it'll be a while before I have a chance to test), but I 
have some real concerns over re-using the PrestoDB Validator for this. First 
off, Trino was forked from Presto several years ago now and the projects 
continue to diverge with each release. But more specifically, I was looking at 
that PrestoDBSQLValidator class and it does a bunch of error handling that 
assumes that the underlying library is PyHive. PyHive is no longer the 
recommended way to connect Superset to Trino and it hasn't been for quite some 
time. Imo, this implementation should take that into consideration and it 
should be independent from PrestoDB / PyHive.



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