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

Gen expr #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
@@ -0,0 +1,48 @@
token literal names:
null
'substr'
'substring'
'substring_index'
'('
')'
','
null
null
null

token symbolic names:
null
SUBSTR
SUBSTRING
SUBSTRING_INDEX
LBRAC
RBRAC
COMMA
ID
WS
INT_LITERAL

rule names:
SUBSTR
SUBSTRING
SUBSTRING_INDEX
LBRAC
RBRAC
COMMA
ID
WS
INT_LITERAL
IDEN_LITERAL
DIGIT
LETTER
EXPONENT_NUM_PART

channel names:
DEFAULT_TOKEN_CHANNEL
HIDDEN

mode names:
DEFAULT_MODE

atn:
[4, 0, 9, 105, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 4, 7, 70, 8, 7, 11, 7, 12, 7, 71, 1, 7, 1, 7, 1, 8, 4, 8, 77, 8, 8, 11, 8, 12, 8, 78, 1, 9, 1, 9, 3, 9, 83, 8, 9, 1, 9, 1, 9, 1, 9, 5, 9, 88, 8, 9, 10, 9, 12, 9, 91, 9, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 3, 12, 99, 8, 12, 1, 12, 4, 12, 102, 8, 12, 11, 12, 12, 12, 103, 0, 0, 13, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 0, 21, 0, 23, 0, 25, 0, 1, 0, 4, 3, 0, 9, 10, 13, 13, 32, 32, 1, 0, 48, 57, 2, 0, 65, 90, 97, 122, 2, 0, 43, 43, 45, 45, 108, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 1, 27, 1, 0, 0, 0, 3, 34, 1, 0, 0, 0, 5, 44, 1, 0, 0, 0, 7, 60, 1, 0, 0, 0, 9, 62, 1, 0, 0, 0, 11, 64, 1, 0, 0, 0, 13, 66, 1, 0, 0, 0, 15, 69, 1, 0, 0, 0, 17, 76, 1, 0, 0, 0, 19, 82, 1, 0, 0, 0, 21, 92, 1, 0, 0, 0, 23, 94, 1, 0, 0, 0, 25, 96, 1, 0, 0, 0, 27, 28, 5, 115, 0, 0, 28, 29, 5, 117, 0, 0, 29, 30, 5, 98, 0, 0, 30, 31, 5, 115, 0, 0, 31, 32, 5, 116, 0, 0, 32, 33, 5, 114, 0, 0, 33, 2, 1, 0, 0, 0, 34, 35, 5, 115, 0, 0, 35, 36, 5, 117, 0, 0, 36, 37, 5, 98, 0, 0, 37, 38, 5, 115, 0, 0, 38, 39, 5, 116, 0, 0, 39, 40, 5, 114, 0, 0, 40, 41, 5, 105, 0, 0, 41, 42, 5, 110, 0, 0, 42, 43, 5, 103, 0, 0, 43, 4, 1, 0, 0, 0, 44, 45, 5, 115, 0, 0, 45, 46, 5, 117, 0, 0, 46, 47, 5, 98, 0, 0, 47, 48, 5, 115, 0, 0, 48, 49, 5, 116, 0, 0, 49, 50, 5, 114, 0, 0, 50, 51, 5, 105, 0, 0, 51, 52, 5, 110, 0, 0, 52, 53, 5, 103, 0, 0, 53, 54, 5, 95, 0, 0, 54, 55, 5, 105, 0, 0, 55, 56, 5, 110, 0, 0, 56, 57, 5, 100, 0, 0, 57, 58, 5, 101, 0, 0, 58, 59, 5, 120, 0, 0, 59, 6, 1, 0, 0, 0, 60, 61, 5, 40, 0, 0, 61, 8, 1, 0, 0, 0, 62, 63, 5, 41, 0, 0, 63, 10, 1, 0, 0, 0, 64, 65, 5, 44, 0, 0, 65, 12, 1, 0, 0, 0, 66, 67, 3, 19, 9, 0, 67, 14, 1, 0, 0, 0, 68, 70, 7, 0, 0, 0, 69, 68, 1, 0, 0, 0, 70, 71, 1, 0, 0, 0, 71, 69, 1, 0, 0, 0, 71, 72, 1, 0, 0, 0, 72, 73, 1, 0, 0, 0, 73, 74, 6, 7, 0, 0, 74, 16, 1, 0, 0, 0, 75, 77, 3, 21, 10, 0, 76, 75, 1, 0, 0, 0, 77, 78, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 78, 79, 1, 0, 0, 0, 79, 18, 1, 0, 0, 0, 80, 83, 3, 23, 11, 0, 81, 83, 5, 95, 0, 0, 82, 80, 1, 0, 0, 0, 82, 81, 1, 0, 0, 0, 83, 89, 1, 0, 0, 0, 84, 88, 3, 23, 11, 0, 85, 88, 3, 21, 10, 0, 86, 88, 5, 95, 0, 0, 87, 84, 1, 0, 0, 0, 87, 85, 1, 0, 0, 0, 87, 86, 1, 0, 0, 0, 88, 91, 1, 0, 0, 0, 89, 87, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 20, 1, 0, 0, 0, 91, 89, 1, 0, 0, 0, 92, 93, 7, 1, 0, 0, 93, 22, 1, 0, 0, 0, 94, 95, 7, 2, 0, 0, 95, 24, 1, 0, 0, 0, 96, 98, 5, 69, 0, 0, 97, 99, 7, 3, 0, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 101, 1, 0, 0, 0, 100, 102, 3, 21, 10, 0, 101, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 101, 1, 0, 0, 0, 103, 104, 1, 0, 0, 0, 104, 26, 1, 0, 0, 0, 8, 0, 71, 78, 82, 87, 89, 98, 103, 1, 0, 1, 0]
176 changes: 176 additions & 0 deletions com/alipay/oceanbase/rpc/protocol/payload/impl/parser/ObExprLexer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
package com.alipay.oceanbase.rpc.protocol.payload.impl.parser;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.*;

@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"})
public class ObExprLexer extends Lexer {
static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }

protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
SUBSTR=1, SUBSTRING=2, SUBSTRING_INDEX=3, LBRAC=4, RBRAC=5, COMMA=6, ID=7,
WS=8, INT_LITERAL=9;
public static String[] channelNames = {
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
};

public static String[] modeNames = {
"DEFAULT_MODE"
};

private static String[] makeRuleNames() {
return new String[] {
"SUBSTR", "SUBSTRING", "SUBSTRING_INDEX", "LBRAC", "RBRAC", "COMMA",
"ID", "WS", "INT_LITERAL", "IDEN_LITERAL", "DIGIT", "LETTER", "EXPONENT_NUM_PART"
};
}
public static final String[] ruleNames = makeRuleNames();

private static String[] makeLiteralNames() {
return new String[] {
null, "'substr'", "'substring'", "'substring_index'", "'('", "')'", "','"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, "SUBSTR", "SUBSTRING", "SUBSTRING_INDEX", "LBRAC", "RBRAC", "COMMA",
"ID", "WS", "INT_LITERAL"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);

/**
* @deprecated Use {@link #VOCABULARY} instead.
*/
@Deprecated
public static final String[] tokenNames;
static {
tokenNames = new String[_SYMBOLIC_NAMES.length];
for (int i = 0; i < tokenNames.length; i++) {
tokenNames[i] = VOCABULARY.getLiteralName(i);
if (tokenNames[i] == null) {
tokenNames[i] = VOCABULARY.getSymbolicName(i);
}

if (tokenNames[i] == null) {
tokenNames[i] = "<INVALID>";
}
}
}

@Override
@Deprecated
public String[] getTokenNames() {
return tokenNames;
}

@Override

public Vocabulary getVocabulary() {
return VOCABULARY;
}


public ObExprLexer(CharStream input) {
super(input);
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}

@Override
public String getGrammarFileName() { return "ObExprLexer.g4"; }

@Override
public String[] getRuleNames() { return ruleNames; }

@Override
public String getSerializedATN() { return _serializedATN; }

@Override
public String[] getChannelNames() { return channelNames; }

@Override
public String[] getModeNames() { return modeNames; }

@Override
public ATN getATN() { return _ATN; }

public static final String _serializedATN =
"\u0004\u0000\ti\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+
"\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+
"\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+
"\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+
"\u0007\u000b\u0002\f\u0007\f\u0001\u0000\u0001\u0000\u0001\u0000\u0001"+
"\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001"+
"\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+
"\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+
"\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+
"\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+
"\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0005\u0001\u0005\u0001"+
"\u0006\u0001\u0006\u0001\u0007\u0004\u0007F\b\u0007\u000b\u0007\f\u0007"+
"G\u0001\u0007\u0001\u0007\u0001\b\u0004\bM\b\b\u000b\b\f\bN\u0001\t\u0001"+
"\t\u0003\tS\b\t\u0001\t\u0001\t\u0001\t\u0005\tX\b\t\n\t\f\t[\t\t\u0001"+
"\n\u0001\n\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0003\fc\b\f\u0001"+
"\f\u0004\ff\b\f\u000b\f\f\fg\u0000\u0000\r\u0001\u0001\u0003\u0002\u0005"+
"\u0003\u0007\u0004\t\u0005\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\u0000"+
"\u0015\u0000\u0017\u0000\u0019\u0000\u0001\u0000\u0004\u0003\u0000\t\n"+
"\r\r \u0001\u000009\u0002\u0000AZaz\u0002\u0000++--l\u0000\u0001\u0001"+
"\u0000\u0000\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005\u0001"+
"\u0000\u0000\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001\u0000"+
"\u0000\u0000\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000\u0000"+
"\u0000\u0000\u000f\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000\u0000"+
"\u0000\u0001\u001b\u0001\u0000\u0000\u0000\u0003\"\u0001\u0000\u0000\u0000"+
"\u0005,\u0001\u0000\u0000\u0000\u0007<\u0001\u0000\u0000\u0000\t>\u0001"+
"\u0000\u0000\u0000\u000b@\u0001\u0000\u0000\u0000\rB\u0001\u0000\u0000"+
"\u0000\u000fE\u0001\u0000\u0000\u0000\u0011L\u0001\u0000\u0000\u0000\u0013"+
"R\u0001\u0000\u0000\u0000\u0015\\\u0001\u0000\u0000\u0000\u0017^\u0001"+
"\u0000\u0000\u0000\u0019`\u0001\u0000\u0000\u0000\u001b\u001c\u0005s\u0000"+
"\u0000\u001c\u001d\u0005u\u0000\u0000\u001d\u001e\u0005b\u0000\u0000\u001e"+
"\u001f\u0005s\u0000\u0000\u001f \u0005t\u0000\u0000 !\u0005r\u0000\u0000"+
"!\u0002\u0001\u0000\u0000\u0000\"#\u0005s\u0000\u0000#$\u0005u\u0000\u0000"+
"$%\u0005b\u0000\u0000%&\u0005s\u0000\u0000&\'\u0005t\u0000\u0000\'(\u0005"+
"r\u0000\u0000()\u0005i\u0000\u0000)*\u0005n\u0000\u0000*+\u0005g\u0000"+
"\u0000+\u0004\u0001\u0000\u0000\u0000,-\u0005s\u0000\u0000-.\u0005u\u0000"+
"\u0000./\u0005b\u0000\u0000/0\u0005s\u0000\u000001\u0005t\u0000\u0000"+
"12\u0005r\u0000\u000023\u0005i\u0000\u000034\u0005n\u0000\u000045\u0005"+
"g\u0000\u000056\u0005_\u0000\u000067\u0005i\u0000\u000078\u0005n\u0000"+
"\u000089\u0005d\u0000\u00009:\u0005e\u0000\u0000:;\u0005x\u0000\u0000"+
";\u0006\u0001\u0000\u0000\u0000<=\u0005(\u0000\u0000=\b\u0001\u0000\u0000"+
"\u0000>?\u0005)\u0000\u0000?\n\u0001\u0000\u0000\u0000@A\u0005,\u0000"+
"\u0000A\f\u0001\u0000\u0000\u0000BC\u0003\u0013\t\u0000C\u000e\u0001\u0000"+
"\u0000\u0000DF\u0007\u0000\u0000\u0000ED\u0001\u0000\u0000\u0000FG\u0001"+
"\u0000\u0000\u0000GE\u0001\u0000\u0000\u0000GH\u0001\u0000\u0000\u0000"+
"HI\u0001\u0000\u0000\u0000IJ\u0006\u0007\u0000\u0000J\u0010\u0001\u0000"+
"\u0000\u0000KM\u0003\u0015\n\u0000LK\u0001\u0000\u0000\u0000MN\u0001\u0000"+
"\u0000\u0000NL\u0001\u0000\u0000\u0000NO\u0001\u0000\u0000\u0000O\u0012"+
"\u0001\u0000\u0000\u0000PS\u0003\u0017\u000b\u0000QS\u0005_\u0000\u0000"+
"RP\u0001\u0000\u0000\u0000RQ\u0001\u0000\u0000\u0000SY\u0001\u0000\u0000"+
"\u0000TX\u0003\u0017\u000b\u0000UX\u0003\u0015\n\u0000VX\u0005_\u0000"+
"\u0000WT\u0001\u0000\u0000\u0000WU\u0001\u0000\u0000\u0000WV\u0001\u0000"+
"\u0000\u0000X[\u0001\u0000\u0000\u0000YW\u0001\u0000\u0000\u0000YZ\u0001"+
"\u0000\u0000\u0000Z\u0014\u0001\u0000\u0000\u0000[Y\u0001\u0000\u0000"+
"\u0000\\]\u0007\u0001\u0000\u0000]\u0016\u0001\u0000\u0000\u0000^_\u0007"+
"\u0002\u0000\u0000_\u0018\u0001\u0000\u0000\u0000`b\u0005E\u0000\u0000"+
"ac\u0007\u0003\u0000\u0000ba\u0001\u0000\u0000\u0000bc\u0001\u0000\u0000"+
"\u0000ce\u0001\u0000\u0000\u0000df\u0003\u0015\n\u0000ed\u0001\u0000\u0000"+
"\u0000fg\u0001\u0000\u0000\u0000ge\u0001\u0000\u0000\u0000gh\u0001\u0000"+
"\u0000\u0000h\u001a\u0001\u0000\u0000\u0000\b\u0000GNRWYbg\u0001\u0000"+
"\u0001\u0000";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
SUBSTR=1
SUBSTRING=2
SUBSTRING_INDEX=3
LBRAC=4
RBRAC=5
COMMA=6
ID=7
WS=8
INT_LITERAL=9
'substr'=1
'substring'=2
'substring_index'=3
'('=4
')'=5
','=6
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@
<artifactId>jdbc</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>4.13.1</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,24 @@ public List<Long> getPartIds(Object[] start, boolean startInclusive, Object[] en
}

// check whether partition key is Min or Max, should refactor after remove addRowkeyElement
for (ObPair<ObColumn, List<Integer>> pair : orderedPartRefColumnRowKeyRelations) {
for (int refIdx : pair.getRight()) {
if (start.length <= refIdx) {
throw new IllegalArgumentException("rowkey length is " + start.length
+ ", which is shortest than " + refIdx);
}
if (start[refIdx] instanceof ObObj
&& (((ObObj) start[refIdx]).isMinObj() || ((ObObj) start[refIdx])
.isMaxObj())) {
return completeWorks;
}
if (end[refIdx] instanceof ObObj
&& (((ObObj) end[refIdx]).isMinObj() || ((ObObj) end[refIdx]).isMaxObj())) {
return completeWorks;
}
}
}
// todo: need rewrite in partition expr
// for (ObPair<ObColumn, List<Integer>> pair : orderedPartRefColumnRowKeyRelations) {
// for (int refIdx : pair.getRight()) {
// if (start.length <= refIdx) {
// throw new IllegalArgumentException("rowkey length is " + start.length
// + ", which is shortest than " + refIdx);
// }
// if (start[refIdx] instanceof ObObj
// && (((ObObj) start[refIdx]).isMinObj() || ((ObObj) start[refIdx])
// .isMaxObj())) {
// return completeWorks;
// }
// if (end[refIdx] instanceof ObObj
// && (((ObObj) end[refIdx]).isMinObj() || ((ObObj) end[refIdx]).isMaxObj())) {
// return completeWorks;
// }
// }
// }

// eval partition key
List<Object> startValues = evalRowKeyValues(start);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,24 @@ public List<Long> getPartIds(Object[] start, boolean startInclusive, Object[] en
}

// check whether partition key is Min or Max, should refactor after remove addRowkeyElement
for (ObPair<ObColumn, List<Integer>> pair : orderedPartRefColumnRowKeyRelations) {
for (int refIdx : pair.getRight()) {
if (start.length <= refIdx) {
throw new IllegalArgumentException("rowkey length is " + start.length
+ ", which is shortest than " + refIdx);
}
if (start[refIdx] instanceof ObObj
&& (((ObObj) start[refIdx]).isMinObj() || ((ObObj) start[refIdx])
.isMaxObj())) {
return completeWorks;
}
if (end[refIdx] instanceof ObObj
&& (((ObObj) end[refIdx]).isMinObj() || ((ObObj) end[refIdx]).isMaxObj())) {
return completeWorks;
}
}
}
// todo: need send all partition id
// for (ObPair<ObColumn, List<Integer>> pair : orderedPartRefColumnRowKeyRelations) {
// for (int refIdx : pair.getRight()) {
// if (start.length <= refIdx) {
// throw new IllegalArgumentException("rowkey length is " + start.length
// + ", which is shortest than " + refIdx);
// }
// if (start[refIdx] instanceof ObObj
// && (((ObObj) start[refIdx]).isMinObj() || ((ObObj) start[refIdx])
// .isMaxObj())) {
// return completeWorks;
// }
// if (end[refIdx] instanceof ObObj
// && (((ObObj) end[refIdx]).isMinObj() || ((ObObj) end[refIdx]).isMaxObj())) {
// return completeWorks;
// }
// }
// }

// eval partition key
List<Object> startValues = evalRowKeyValues(start);
Expand Down Expand Up @@ -170,7 +171,7 @@ public Long getPartId(List<Object[]> rowKeys, boolean consistency) {
}

try {
int partRefColumnSize = orderedPartRefColumnRowKeyRelations.size();
int partColumnSize = partColumns.size();
List<Object> evalValues = null;

for (Object[] rowKey : rowKeys) {
Expand All @@ -188,20 +189,18 @@ public Long getPartId(List<Object[]> rowKeys, boolean consistency) {
}

for (int i = 0; i < evalValues.size(); i++) {
if (!equalsWithCollationType(orderedPartRefColumnRowKeyRelations.get(i)
.getLeft().getObCollationType(), evalValues.get(i),
currentRowKeyEvalValues.get(i))) {
if (!equalsWithCollationType(partColumns.get(i).getObCollationType(),
evalValues.get(i), currentRowKeyEvalValues.get(i))) {
throw new ObTablePartitionConsistentException(
"across partition operation may cause consistent problem " + rowKeys);
}
}
}

long hashValue = 0L;
for (int i = 0; i < partRefColumnSize; i++) {
hashValue = ObHashUtils.toHashcode(evalValues.get(i),
orderedPartRefColumnRowKeyRelations.get(i).getLeft(), hashValue,
this.getPartFuncType());
for (int i = 0; i < partColumnSize; i++) {
hashValue = ObHashUtils.toHashcode(evalValues.get(i), partColumns.get(i),
hashValue, this.getPartFuncType());
}

hashValue = (hashValue > 0 ? hashValue : -hashValue);
Expand Down
Loading
Loading