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

Propagate table information when creating Connection for RecordCursor #15196

Merged
merged 1 commit into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -410,7 +410,7 @@ public ConnectorSplitSource getSplits(ConnectorSession session, JdbcTableHandle
}

@Override
public Connection getConnection(ConnectorSession session, JdbcSplit split)
public Connection getConnection(ConnectorSession session, JdbcSplit split, JdbcTableHandle tableHandle)
throws SQLException
{
Connection connection = connectionFactory.openConnection(session);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ public ConnectorSplitSource getSplits(ConnectorSession session, JdbcTableHandle
}

@Override
public Connection getConnection(ConnectorSession session, JdbcSplit split)
public Connection getConnection(ConnectorSession session, JdbcSplit split, JdbcTableHandle tableHandle)
throws SQLException
{
return delegate.getConnection(session, split);
return delegate.getConnection(session, split, tableHandle);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ public ConnectorSplitSource getSplits(ConnectorSession session, JdbcTableHandle
}

@Override
public Connection getConnection(ConnectorSession session, JdbcSplit split)
public Connection getConnection(ConnectorSession session, JdbcSplit split, JdbcTableHandle tableHandle)
throws SQLException
{
return delegate().getConnection(session, split);
return delegate().getConnection(session, split, tableHandle);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ default Optional<String> convertPredicate(ConnectorSession session, ConnectorExp

ConnectorSplitSource getSplits(ConnectorSession session, JdbcTableHandle tableHandle);

Connection getConnection(ConnectorSession session, JdbcSplit split)
Connection getConnection(ConnectorSession session, JdbcSplit split, JdbcTableHandle tableHandle)
throws SQLException;

default void abortReadConnection(Connection connection, ResultSet resultSet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public JdbcRecordCursor(JdbcClient jdbcClient, ExecutorService executor, Connect
objectReadFunctions = new ObjectReadFunction[columnHandles.size()];

try {
connection = jdbcClient.getConnection(session, split);
connection = jdbcClient.getConnection(session, split, table);

for (int i = 0; i < this.columnHandles.length; i++) {
JdbcColumnHandle columnHandle = columnHandles.get(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ public ConnectorSplitSource getSplits(ConnectorSession session, JdbcTableHandle
}

@Override
public Connection getConnection(ConnectorSession session, JdbcSplit split)
public Connection getConnection(ConnectorSession session, JdbcSplit split, JdbcTableHandle tableHandle)
throws SQLException
{
return stats.getGetConnectionWithSplit().wrap(() -> delegate().getConnection(session, split));
return stats.getGetConnectionWithSplit().wrap(() -> delegate().getConnection(session, split, tableHandle));
}

@Override
Expand Down