sadpandajoe commented on code in PR #43695:
URL: https://github.com/apache/superset/pull/43695#discussion_r4193544803


##########
tests/unit_tests/db_engine_specs/test_exasol.py:
##########
@@ -189,3 +225,4 @@ def test_extract_verbose_empty_diagnostic(diagnostic: str, 
wrapped: bool) -> Non
     assert errors[0].message == prefix + envelope.strip()
     assert "code         =>  42000" in errors[0].message
     assert sql not in errors[0].message
+>>>>>>> upstream/master

Review Comment:
   This leftover `>>>>>>> upstream/master` merge marker is invalid Python, so 
pytest can't import this module and collection of the engine-spec tests fails 
with a `SyntaxError` (it will also trip the Python lint/pre-commit checks). 
Could you remove this line and confirm the surrounding merge result is what you 
intended?



##########
superset/db_engine_specs/arc.py:
##########
@@ -42,9 +42,13 @@ class ArcEngineSpec(BaseEngineSpec):
 
     metadata = {
         "description": "Arc is a data platform with multiple connection 
options.",
+        "logo": "arc.png",

Review Comment:
   `arc.png` (and the new `ocient.png`, `maxcompute.png`, and `parseable.png` 
logos added in `ocient.py`, `odps.py`, and `parseable.py`) don't exist under 
`docs/static/img/databases/`, and the docs pages render `/img/databases/<logo>` 
directly. After the docs regenerate, these four databases show broken images. 
Could you add the assets in this PR or drop the `logo` entries until they exist?



##########
tests/unit_tests/db_engine_specs/test_teradata.py:
##########
@@ -0,0 +1,56 @@
+# 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.
+import pytest
+
+from superset.db_engine_specs.teradata import TeradataEngineSpec
+
+
+def test_teradata_properties() -> None:
+    assert TeradataEngineSpec.engine == "teradatasql"
+    assert TeradataEngineSpec.engine_name == "Teradata"
+    assert TeradataEngineSpec.max_column_name_length == 30
+
+
+def test_teradata_metadata() -> None:
+    metadata = TeradataEngineSpec.metadata
+    desc = metadata["description"]
+    assert "Teradata is an enterprise data warehouse platform" in desc
+    assert metadata["logo"] == "teradata.png"
+    assert "teradatasqlalchemy" in metadata["pypi_packages"]
+    assert metadata["default_port"] == 1025
+
+
+def test_teradata_epoch_to_dttm() -> None:
+    assert "DATE '1970-01-01'" in 
TeradataEngineSpec.epoch_to_dttm().format(col="ts")

Review Comment:
   `"DATE '1970-01-01'" in ...` would still pass if the `({col} / 86400)` day 
arithmetic or the `({col} MOD 86400)` seconds interval were dropped, so a 
broken epoch conversion goes unnoticed. Could this assert the full formatted 
SQL for `col="ts"` instead?



##########
superset/db_engine_specs/arc.py:
##########
@@ -42,9 +42,13 @@ class ArcEngineSpec(BaseEngineSpec):
 
     metadata = {
         "description": "Arc is a data platform with multiple connection 
options.",
+        "logo": "arc.png",
+        "homepage_url": "https://arc.net";,

Review Comment:
   `https://arc.net` is the Arc web browser's site, not the database that 
`arc-superset-arrow` connects to, so the generated docs page sends users to an 
unrelated product. `docs_url` on line 51 (`https://docs.arcdata.io`) also 
doesn't resolve in DNS. Could you point both at the Arc database project's real 
homepage and docs?



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