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

The SQL can't run on distributed mode #2071

Closed
killme2008 opened this issue Aug 2, 2023 · 4 comments
Closed

The SQL can't run on distributed mode #2071

killme2008 opened this issue Aug 2, 2023 · 4 comments
Assignees
Labels
C-bug Category Bugs

Comments

@killme2008
Copy link
Contributor

What type of bug is this?

Unexpected error

What subsystems are affected?

Frontend

What happened?

The following sql can't run on distributed mode, but works in standalone:

CREATE TABLE IF NOT EXISTS timestamp (t TIMESTAMP, ts TIMESTAMP time index DEFAULT current_timestamp());

INSERT INTO timestamp VALUES ('2008-01-01 00:00:01', 1), (NULL, 2), ('2007-01-01 00:00:01', 3), ('2008-02-01 00:00:01', 4), ('2008-01-02 00:00:01', 5), ('2008-01-01 10:00:00', 6), ('2008-01-01 00:10:00', 7), ('2008-01-01 00:00:10', 8);

SELECT t-t FROM timestamp;

The error:

 Error: 3001(EngineExecuteQuery), No field named timestamp.t. Valid fields are "timestamp.t - timestamp.t

What operating system did you use?

Any OS

Relevant log output and stack trace

No response

How can we reproduce the bug?

As described above.

@killme2008 killme2008 added the C-bug Category Bugs label Aug 2, 2023
@waynexia
Copy link
Member

waynexia commented Aug 8, 2023

Wait for apache/datafusion#7224

@killme2008
Copy link
Contributor Author

Wait for apache/arrow-datafusion#7224

It was merged, when will we update datafusion?

@waynexia
Copy link
Member

Wait for apache/arrow-datafusion#7224

It was merged, when will we update datafusion?

Recently. I have another unmerged patch

@waynexia
Copy link
Member

It's resolved after #2659

MySQL [(none)]> CREATE TABLE IF NOT EXISTS timestamp (t TIMESTAMP, ts TIMESTAMP time index DEFAULT current_timestamp());
Query OK, 0 rows affected (0.002 sec)

MySQL [(none)]> INSERT INTO timestamp VALUES ('2008-01-01 00:00:01', 1), (NULL, 2), ('2007-01-01 00:00:01', 3), ('2008-02-01 00:00:01', 4), ('2008-01-02 00:00:01', 5), ('2008-01-01 10:00:00', 6), ('2008-01-01 00:10:00', 7), ('2008-01-01 00:00:10', 8);
Query OK, 8 rows affected (0.001 sec)

MySQL [(none)]> SELECT t-t FROM timestamp;
+---------------------------+
| timestamp.t - timestamp.t |
+---------------------------+
| 00:00:00                  |
| NULL                      |
| 00:00:00                  |
| 00:00:00                  |
| 00:00:00                  |
| 00:00:00                  |
| 00:00:00                  |
| 00:00:00                  |
+---------------------------+
8 rows in set (0.002 sec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs
Projects
None yet
Development

No branches or pull requests

2 participants