01: /*
02:
03: Derby - Class org.apache.derby.impl.sql.execute.rts.RealHashJoinStatistics
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to you under the Apache License, Version 2.0
09: (the "License"); you may not use this file except in compliance with
10: the License. You may obtain a copy of the License at
11:
12: http://www.apache.org/licenses/LICENSE-2.0
13:
14: Unless required by applicable law or agreed to in writing, software
15: distributed under the License is distributed on an "AS IS" BASIS,
16: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: See the License for the specific language governing permissions and
18: limitations under the License.
19:
20: */
21:
22: package org.apache.derby.impl.sql.execute.rts;
23:
24: import org.apache.derby.iapi.services.i18n.MessageService;
25: import org.apache.derby.iapi.reference.SQLState;
26:
27: /**
28: ResultSetStatistics implemenation for HashJoinResultSet.
29:
30: @author jerry
31:
32: */
33: public class RealHashJoinStatistics extends
34: RealNestedLoopJoinStatistics {
35:
36: // CONSTRUCTORS
37:
38: /**
39: *
40: *
41: */
42: public RealHashJoinStatistics(int numOpens, int rowsSeen,
43: int rowsFiltered, long constructorTime, long openTime,
44: long nextTime, long closeTime, int resultSetNumber,
45: int rowsSeenLeft, int rowsSeenRight, int rowsReturned,
46: long restrictionTime, boolean oneRowRightSide,
47: double optimizerEstimatedRowCount,
48: double optimizerEstimatedCost,
49: String userSuppliedOptimizerOverrides,
50: ResultSetStatistics leftResultSetStatistics,
51: ResultSetStatistics rightResultSetStatistics) {
52: super (numOpens, rowsSeen, rowsFiltered, constructorTime,
53: openTime, nextTime, closeTime, resultSetNumber,
54: rowsSeenLeft, rowsSeenRight, rowsReturned,
55: restrictionTime, oneRowRightSide,
56: optimizerEstimatedRowCount, optimizerEstimatedCost,
57: userSuppliedOptimizerOverrides,
58: leftResultSetStatistics, rightResultSetStatistics);
59: }
60:
61: // ResultSetStatistics methods
62:
63: // Class implementation
64:
65: protected void setNames() {
66: if (oneRowRightSide) {
67: nodeName = MessageService
68: .getTextMessage(SQLState.RTS_HASH_EXISTS_JOIN);
69: resultSetName = MessageService
70: .getTextMessage(SQLState.RTS_HASH_EXISTS_JOIN_RS);
71: } else {
72: nodeName = MessageService
73: .getTextMessage(SQLState.RTS_HASH_JOIN);
74: resultSetName = MessageService
75: .getTextMessage(SQLState.RTS_HASH_JOIN_RS);
76: }
77: }
78: }
|