Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tracking Issue] Failed SQLs in duckdb test #5012

Open
5 tasks
CookiePieWw opened this issue Nov 18, 2024 · 0 comments
Open
5 tasks

[Tracking Issue] Failed SQLs in duckdb test #5012

CookiePieWw opened this issue Nov 18, 2024 · 0 comments
Labels
C-enhancement Category Enhancements tracking-issue A tracking issue for a feature.

Comments

@CookiePieWw
Copy link
Collaborator

CookiePieWw commented Nov 18, 2024

While migrating duckdb tests into GreptimeDB, there're many SQLs that are not available:

  1. Refused by datafusion:
    • Exists:
      > SELECT EXISTS(SELECT 1);
      ERROR 1815 (HY000): (EngineExecuteQuery): DataFusion error: This feature is not implemented: Physical plan does not support logical expression Exists(Exists { subquery: <subquery>, negated: false });
    • Correlated column in predicate
      > SELECT s.n, e.course, e.grade FROM students s, exams e WHERE s.id=e.sid AND (s.major = 'CS' OR s.major = 'Games Eng') AND e.grade <= (SELECT AVG(e2.grade) - 1 FROM exams e2 WHERE s.id=e2.sid OR (e2.curriculum=s.major AND s.y>=e2.y)) ORDER BY n, course;
       ERROR 1815 (HY000): (EngineExecuteQuery): DataFusion error: Error during planning: Correlated column is not allowed in predicate: outer_ref(s.id) = e2.sid OR e2.curriculum = outer_ref(s.major) AND outer_ref(s.y) >= e2.y;
  2. Unsupported:
    • Direct FROM
      > FROM numbers;
      ERROR 1235 (42000): (Unsupported): SQL statement is not supported, keyword: FROM
    • unamed_subquery as an alias to subqueries
      > SELECT unnamed_subquery.a, unnamed_subquery2.b FROM (SELECT 42 a), (SELECT 43 b);
      ERROR 1815 (HY000): (PlanQuery): Failed to plan SQL: No field named unnamed_subquery.a. Valid fields are a, b.
    • Array/list types:
      > CREATE TABLE lists(l INTEGER[]);

If some of above are needed, we can try to introduce them to greptimedb.

@CookiePieWw CookiePieWw added the C-enhancement Category Enhancements label Nov 18, 2024
@evenyag evenyag added the tracking-issue A tracking issue for a feature. label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements tracking-issue A tracking issue for a feature.
Projects
None yet
Development

No branches or pull requests

2 participants