Codota Logo
MatchRecognizeScope
Code IndexAdd Codota to your IDE (free)

How to use
MatchRecognizeScope
in
org.apache.calcite.sql.validate

Best Java code snippets using org.apache.calcite.sql.validate.MatchRecognizeScope (Showing top 12 results out of 315)

  • Common ways to obtain MatchRecognizeScope
private void myMethod () {
MatchRecognizeScope m =
  • Codota IconSqlValidatorScope parent;SqlMatchRecognize matchRecognize;new MatchRecognizeScope(parent, matchRecognize)
  • Smart code suggestions by Codota
}
origin: apache/flink

private void registerMatchRecognize(
  SqlValidatorScope parentScope,
  SqlValidatorScope usingScope,
  SqlMatchRecognize call,
  SqlNode enclosingNode,
  String alias,
  boolean forceNullable) {
  final MatchRecognizeNamespace matchRecognizeNamespace =
    createMatchRecognizeNameSpace(call, enclosingNode);
  registerNamespace(usingScope, alias, matchRecognizeNamespace, forceNullable);
  final MatchRecognizeScope matchRecognizeScope =
    new MatchRecognizeScope(parentScope, call);
  scopes.put(call, matchRecognizeScope);
  // parse input query
  SqlNode expr = call.getTableRef();
  SqlNode newExpr = registerFrom(usingScope, matchRecognizeScope, true, expr,
    expr, null, null, forceNullable, false);
  if (expr != newExpr) {
    call.setOperand(0, newExpr);
  }
}
origin: apache/flink

  List<SqlNode> operands = ((SqlCall) node).getOperandList();
  String leftString = ((SqlIdentifier) operands.get(0)).getSimple();
  if (scope.getPatternVars().contains(leftString)) {
    throw newValidationError(operands.get(0),
      RESOURCE.patternVarAlreadyDefined(leftString));
  scope.addPatternVar(leftString);
  for (SqlNode right : (SqlNodeList) operands.get(1)) {
    SqlIdentifier id = (SqlIdentifier) right;
    if (!scope.getPatternVars().contains(id.getSimple())) {
      throw newValidationError(id,
        RESOURCE.unknownPattern(id.getSimple()));
    scope.addPatternVar(id.getSimple());
final SqlCall skipToCall = (SqlCall) skipTo;
final SqlIdentifier id = skipToCall.operand(0);
if (!scope.getPatternVars().contains(id.getSimple())) {
  throw newValidationError(id,
    RESOURCE.unknownPattern(id.getSimple()));
origin: apache/flink

@Override public Void visit(SqlIdentifier id) {
  Preconditions.checkArgument(id.isSimple());
  scope.addPatternVar(id.getSimple());
  return null;
}
origin: apache/flink

    Static.RESOURCE.patternVarAlreadyDefined(alias));
scope.addPatternVar(alias);
origin: Qihoo360/Quicksql

 List<SqlNode> operands = ((SqlCall) node).getOperandList();
 String leftString = ((SqlIdentifier) operands.get(0)).getSimple();
 if (scope.getPatternVars().contains(leftString)) {
  throw newValidationError(operands.get(0),
    RESOURCE.patternVarAlreadyDefined(leftString));
 scope.addPatternVar(leftString);
 for (SqlNode right : (SqlNodeList) operands.get(1)) {
  SqlIdentifier id = (SqlIdentifier) right;
  if (!scope.getPatternVars().contains(id.getSimple())) {
   throw newValidationError(id,
     RESOURCE.unknownPattern(id.getSimple()));
  scope.addPatternVar(id.getSimple());
final SqlCall skipToCall = (SqlCall) skipTo;
final SqlIdentifier id = skipToCall.operand(0);
if (!scope.getPatternVars().contains(id.getSimple())) {
 throw newValidationError(id,
   RESOURCE.unknownPattern(id.getSimple()));
origin: Qihoo360/Quicksql

@Override public Void visit(SqlIdentifier id) {
 Preconditions.checkArgument(id.isSimple());
 scope.addPatternVar(id.getSimple());
 return null;
}
origin: Qihoo360/Quicksql

private void registerMatchRecognize(
  SqlValidatorScope parentScope,
  SqlValidatorScope usingScope,
  SqlMatchRecognize call,
  SqlNode enclosingNode,
  String alias,
  boolean forceNullable) {
 final MatchRecognizeNamespace matchRecognizeNamespace =
   createMatchRecognizeNameSpace(call, enclosingNode);
 registerNamespace(usingScope, alias, matchRecognizeNamespace, forceNullable);
 final MatchRecognizeScope matchRecognizeScope =
   new MatchRecognizeScope(parentScope, call);
 scopes.put(call, matchRecognizeScope);
 // parse input query
 SqlNode expr = call.getTableRef();
 SqlNode newExpr = registerFrom(usingScope, matchRecognizeScope, true, expr,
   expr, null, null, forceNullable, false);
 if (expr != newExpr) {
  call.setOperand(0, newExpr);
 }
}
origin: org.apache.calcite/calcite-core

 List<SqlNode> operands = ((SqlCall) node).getOperandList();
 String leftString = ((SqlIdentifier) operands.get(0)).getSimple();
 if (scope.getPatternVars().contains(leftString)) {
  throw newValidationError(operands.get(0),
    RESOURCE.patternVarAlreadyDefined(leftString));
 scope.addPatternVar(leftString);
 for (SqlNode right : (SqlNodeList) operands.get(1)) {
  SqlIdentifier id = (SqlIdentifier) right;
  if (!scope.getPatternVars().contains(id.getSimple())) {
   throw newValidationError(id,
     RESOURCE.unknownPattern(id.getSimple()));
  scope.addPatternVar(id.getSimple());
final SqlCall skipToCall = (SqlCall) skipTo;
final SqlIdentifier id = skipToCall.operand(0);
if (!scope.getPatternVars().contains(id.getSimple())) {
 throw newValidationError(id,
   RESOURCE.unknownPattern(id.getSimple()));
origin: org.apache.calcite/calcite-core

@Override public Void visit(SqlIdentifier id) {
 Preconditions.checkArgument(id.isSimple());
 scope.addPatternVar(id.getSimple());
 return null;
}
origin: org.apache.calcite/calcite-core

private void registerMatchRecognize(
  SqlValidatorScope parentScope,
  SqlValidatorScope usingScope,
  SqlMatchRecognize call,
  SqlNode enclosingNode,
  String alias,
  boolean forceNullable) {
 final MatchRecognizeNamespace matchRecognizeNamespace =
   createMatchRecognizeNameSpace(call, enclosingNode);
 registerNamespace(usingScope, alias, matchRecognizeNamespace, forceNullable);
 final MatchRecognizeScope matchRecognizeScope =
   new MatchRecognizeScope(parentScope, call);
 scopes.put(call, matchRecognizeScope);
 // parse input query
 SqlNode expr = call.getTableRef();
 SqlNode newExpr = registerFrom(usingScope, matchRecognizeScope, true, expr,
   expr, null, null, forceNullable, false);
 if (expr != newExpr) {
  call.setOperand(0, newExpr);
 }
}
origin: org.apache.calcite/calcite-core

   Static.RESOURCE.patternVarAlreadyDefined(alias));
scope.addPatternVar(alias);
origin: Qihoo360/Quicksql

   Static.RESOURCE.patternVarAlreadyDefined(alias));
scope.addPatternVar(alias);
org.apache.calcite.sql.validateMatchRecognizeScope

Javadoc

Scope for expressions in a MATCH_RECOGNIZE clause.

Defines variables and uses them as prefix of columns reference.

Most used methods

  • <init>
    Creates a MatchRecognizeScope.
  • addPatternVar
  • getPatternVars

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • JFileChooser (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now