Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
Open
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ public String getPlan() {
public QueryCost estimate(AbstractQueryContext qctx) throws LensException {
MethodMetricsContext validateGauge = MethodMetricsFactory.createMethodGauge(qctx.getDriverConf(this), true,
VALIDATE_GAUGE);
String rewrittenQuery = rewriteQuery(qctx);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why changes are done in estimate, when you are fixing bug in prepareQuery.

Copy link
Author

@RajashekharChoukimath RajashekharChoukimath Aug 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the azure-world, we are not going to have Lens interacting with the actual underlying drivers. https://docs.google.com/document/d/1K5Q3ZQZAEGkf472DZ_zuLbHZ9ycx86YAEhqbxO0o-aA/edit#

The cleaner way for me is to remove driverconnection which Lens is making for the explain part in prepareInternal Method
https://github.com/apache/lens/blob/master/lens-driver-jdbc/src/main/java/org/apache/lens/driver/jdbc/JDBCDriver.java#L728

qctx.setSelectedDriverQuery(rewrittenQuery);
validate(qctx);
validateGauge.markSuccess();
return calculateQueryCost(qctx);
Expand Down