-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Revert explain attributes change #16004
Revert explain attributes change #16004
Conversation
@@ -405,7 +405,7 @@ public ExplainAttributes explainAttributes() | |||
{ | |||
return new ExplainAttributes( | |||
DruidSqlReplace.OPERATOR.getName(), | |||
targetDatasource, | |||
targetDatasource.getType(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it weird that the type is returning the name of the table in tableDestination. Wdyt ? Should we adjust the inteface IngestDestination
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does seem like a mistake.
We did release #15689 in 29.0.0. It accidentally included a breaking API change, which is problematic. This PR reverts the breaking change, but since #15689 has already been released, that means this PR is also a breaking API change. We need to treat it as such. There's a few options:
IMO, given that this API is not likely widely used, and 29.0.0 was just a single release, (2) is the best option. But we do need to consider the other options when reviewing. IMO, the new format from 29.0.0 was also not designed ideally, since it is a JSON object that is similar to, but not the same as, the native datasource object. For example, the table name is under the key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates the docs to include a breaking change made regarding the attributes returned by an explain query. The return type of the field targetDataSource was changed to an object instead of a string containing the data source name. This change is only present in Druid 29, and not in future versions, so it has been documented here. The change has been reverted in future versions here: #16004
* Revert explain attributes change * Fix tests * Fix tests * Rename function
Reverts a change made to explain attributes made by #15689. This will maintain backward compatibility.
The
targetDataSource
attribute is changed to return a string containing the datasources name, or "extern" if the query is an export.This PR has: