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

[Bug] NPE when deleting timeseries via Java API #12473

Closed
1 of 2 tasks
bossenti opened this issue May 6, 2024 · 3 comments
Closed
1 of 2 tasks

[Bug] NPE when deleting timeseries via Java API #12473

bossenti opened this issue May 6, 2024 · 3 comments

Comments

@bossenti
Copy link

bossenti commented May 6, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Version

1.3.0 (Java API)

Describe the bug and provide the minimal reproduce step

Deleting a time series via the Java API yields to a NullPointerExecption.

sessionPool.executeQueryStatement(DELETE timeseries root.*)

leads to:

java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because "columnNameList" is null
at org.apache.iotdb.rpc.IoTDBRpcDataSet.<init>(IoTDBRpcDataSet.java:104)
at org.apache.iotdb.isession.SessionDataSet.<init>(SessionDataSet.java:121)
at org.apache.iotdb.session.SessionConnection.executeQueryStatement(SessionConnection.java:399)
at org.apache.iotdb.session.Session.executeStatementMayRedirect(Session.java:791)
at org.apache.iotdb.session.Session.executeQueryStatement(Session.java:763)

Nevertheless, the time series is deleted so the query is executed successfully but there seems to be an issue when creating the response object.

What did you expect to see?

Executing the query without an exception

What did you see instead?

The stack trace as shown above.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
Copy link

github-actions bot commented May 6, 2024

Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!

@HTHou
Copy link
Contributor

HTHou commented May 7, 2024

Hi @bossenti , executeQueryStatement is for query statement only. You should use executeNonQueryStatement for delete statement.

@bossenti
Copy link
Author

bossenti commented May 7, 2024

My bad 🙈 Please apologize, thank you for your help!

@bossenti bossenti closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants