@Override public boolean isSqlIdentifierEqual(SqlIdentifier querySqlIdentifier, SqlIdentifier exprSqlIdentifier) { int parsedIdx = ParamNodeParser.parseParamIdx(exprSqlIdentifier.toString()); if (parsedIdx >= 0) { SqlNode matchedBefore = matchedNodesMap.get(parsedIdx); if (matchedBefore != null) { return ExpressionComparator.isNodeEqual(querySqlIdentifier, matchedBefore, this); } else { matchedNodesMap.put(parsedIdx, querySqlIdentifier); return true; } } else { return querySqlIdentifier.equalsDeep(exprSqlIdentifier, Litmus.IGNORE); } }
@Override public boolean isSqlIdentifierEqual(SqlIdentifier querySqlIdentifier, SqlIdentifier exprSqlIdentifier) { int parsedIdx = ParamNodeParser.parseParamIdx(exprSqlIdentifier.toString()); if (parsedIdx >= 0) { SqlNode matchedBefore = matchedNodesMap.get(parsedIdx); if (matchedBefore != null) { return ExpressionComparator.isNodeEqual(querySqlIdentifier, matchedBefore, this); } else { matchedNodesMap.put(parsedIdx, querySqlIdentifier); return true; } } else { return querySqlIdentifier.equalsDeep(exprSqlIdentifier, Litmus.IGNORE); } }
@Override public RelDataType getNamedType(SqlIdentifier typeName) { if (typeName.equalsDeep(fixture.addressType.getSqlIdentifier(), Litmus.IGNORE)) { return fixture.addressType; } else { return super.getNamedType(typeName); } }
@Override public RelDataType getNamedType(SqlIdentifier typeName) { if (typeName.equalsDeep(fixture.addressType.getSqlIdentifier(), Litmus.IGNORE)) { return fixture.addressType; } else { return super.getNamedType(typeName); } }
public boolean equalsDeep(SqlNode node, Litmus litmus) { if (!(node instanceof SqlDataTypeSpec)) { return litmus.fail("{} != {}", this, node); } SqlDataTypeSpec that = (SqlDataTypeSpec) node; if (!SqlNode.equalDeep( this.collectionsTypeName, that.collectionsTypeName, litmus)) { return litmus.fail(null); } if (!this.typeName.equalsDeep(that.typeName, litmus)) { return litmus.fail(null); } if (this.precision != that.precision) { return litmus.fail("{} != {}", this, node); } if (this.scale != that.scale) { return litmus.fail("{} != {}", this, node); } if (!Objects.equals(this.timeZone, that.timeZone)) { return litmus.fail("{} != {}", this, node); } if (!Objects.equals(this.charSetName, that.charSetName)) { return litmus.fail("{} != {}", this, node); } return litmus.succeed(); }
public boolean equalsDeep(SqlNode node, Litmus litmus) { if (!(node instanceof SqlDataTypeSpec)) { return litmus.fail("{} != {}", this, node); } SqlDataTypeSpec that = (SqlDataTypeSpec) node; if (!SqlNode.equalDeep( this.collectionsTypeName, that.collectionsTypeName, litmus)) { return litmus.fail(null); } if (!this.typeName.equalsDeep(that.typeName, litmus)) { return litmus.fail(null); } if (this.precision != that.precision) { return litmus.fail("{} != {}", this, node); } if (this.scale != that.scale) { return litmus.fail("{} != {}", this, node); } if (!Objects.equals(this.timeZone, that.timeZone)) { return litmus.fail("{} != {}", this, node); } if (!Objects.equals(this.charSetName, that.charSetName)) { return litmus.fail("{} != {}", this, node); } return litmus.succeed(); }
if(((SqlWindow) sqlNode).getDeclName().equalsDeep(window, false)) { window = sqlNode; break;
if (((SqlWindow) sqlNode).getDeclName().equalsDeep(window, Litmus.IGNORE)) { window = sqlNode; break;