-
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
Refactor: Move some classes from sql
to processing
& server
for reusability
#17542
Refactor: Move some classes from sql
to processing
& server
for reusability
#17542
Conversation
…g with other server clients.
…okerServiceModule.
sql
to processing
& server
for reusabilitysql
to processing
& server
for reusability
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.
Looks good, minor suggestion for tests.
public class ClientSqlQueryTest | ||
{ | ||
@Test | ||
public void testSerde() throws JsonProcessingException |
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.
There should be a test in SqlQueryTest
to test inter-conversion between SqlQuery
and ClientSqlQuery
.
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.
Done. Also, fixed a related bug with parameters caught in the unit test.
ea7a58d
to
0616081
Compare
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.
LGTM
This PR contains non-functional / refactoring changes of the following classes in the
sql
module:ExplainPlan
andExplainAttributes
fromsql/src/main/java/org/apache/druid/sql/http
toprocessing/src/main/java/org/apache/druid/query/explain
sql/src/main/java/org/apache/druid/sql/SqlTaskStatus.java
->processing/src/main/java/org/apache/druid/query/http/SqlTaskStatus.java
processing/src/main/java/org/apache/druid/query/http/ClientSqlQuery.java
that is effectively a thin POJO version ofSqlQuery
in thesql
module but without any of the Calcite functionality and business logic.BrokerClient
,BrokerClientImpl
andBroker
classes fromsql/src/main/java/org/apache/druid/sql/client
toserver/src/main/java/org/apache/druid/client/broker
.BrokerServiceModule
that provided theBrokerClient
. The functionality is now contained inServiceClientModule
in theserver
package itself which provides all the clients as well.This is done so that we can reuse the said classes in #17353 without brining in Calcite and other dependencies to the Overlord.
This PR has: