Skip to content

Commit b940389

Browse files
committed
add comment
1 parent 85f1a29 commit b940389

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

java-bigquery/google-cloud-bigquery-jdbc/src/main/java/com/google/cloud/bigquery/jdbc/BigQueryJdbcContextProxy.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl
132132
try (BigQueryJdbcMdc.MdcCloseable mdc = BigQueryJdbcMdc.registerInstance(connectionId)) {
133133
Object result = method.invoke(target, args);
134134

135-
// Automatically cascade proxy wrappers to child JDBC objects returned from calls
135+
// Symmetrical Cascade: Dynamic ResultSet concrete classes are deliberately unproxied here.
136+
// Bypassing proxies on high-frequency ResultSet iterations avoids dynamic invocation
137+
// and argument array allocations, allowing the JIT compiler to natively inline getters.
136138
if (result instanceof java.sql.CallableStatement) {
137139
return wrap(result, java.sql.CallableStatement.class, connectionId);
138140
} else if (result instanceof java.sql.PreparedStatement) {

0 commit comments

Comments
 (0)