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

Reduce per-row computations for time and timestamp in MySQL #17483

Merged
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 @@ -493,6 +493,8 @@ private static LongReadFunction mySqlTimestampReadFunction(TimestampType timesta
{
return new LongReadFunction()
{
private final LongReadFunction delegate = timestampReadFunction(timestampType);

@Override
public boolean isNull(ResultSet resultSet, int columnIndex)
throws SQLException
Expand All @@ -506,7 +508,7 @@ public boolean isNull(ResultSet resultSet, int columnIndex)
public long readLong(ResultSet resultSet, int columnIndex)
throws SQLException
{
return timestampReadFunction(timestampType).readLong(resultSet, columnIndex);
return delegate.readLong(resultSet, columnIndex);
}
};
}
Expand All @@ -515,6 +517,8 @@ private static LongReadFunction mySqlTimeReadFunction(TimeType timeType)
{
return new LongReadFunction()
{
private final LongReadFunction delegate = timeReadFunction(timeType);

@Override
public boolean isNull(ResultSet resultSet, int columnIndex)
throws SQLException
Expand All @@ -528,7 +532,7 @@ public boolean isNull(ResultSet resultSet, int columnIndex)
public long readLong(ResultSet resultSet, int columnIndex)
throws SQLException
{
return timeReadFunction(timeType).readLong(resultSet, columnIndex);
return delegate.readLong(resultSet, columnIndex);
}
};
}
Expand Down