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

How to use
SimpleCalciteSchema
in
org.apache.calcite.jdbc

Best Java code snippets using org.apache.calcite.jdbc.SimpleCalciteSchema (Showing top 17 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: Qihoo360/Quicksql

public CalciteSchema add(String name, Schema schema) {
 final CalciteSchema calciteSchema =
   new SimpleCalciteSchema(this, schema, name);
 subSchemaMap.put(name, calciteSchema);
 return calciteSchema;
}
origin: Qihoo360/Quicksql

protected TableEntry getImplicitTable(String tableName,
  boolean caseSensitive) {
 // Check implicit tables.
 Table table = schema.getTable(tableName);
 if (table != null) {
  return tableEntry(tableName, table);
 }
 return null;
}
origin: org.apache.calcite/calcite-core

protected TypeEntry getImplicitType(String name, boolean caseSensitive) {
 // Check implicit types.
 RelProtoDataType type = schema.getType(name);
 if (type != null) {
  return typeEntry(name, type);
 }
 return null;
}
origin: Qihoo360/Quicksql

protected CalciteSchema snapshot(CalciteSchema parent, SchemaVersion version) {
 CalciteSchema snapshot = new SimpleCalciteSchema(parent,
   schema.snapshot(version), name, null, tableMap, latticeMap, typeMap,
   functionMap, functionNames, nullaryFunctionMap, getPath());
 for (CalciteSchema subSchema : subSchemaMap.map().values()) {
  CalciteSchema subSchemaSnapshot = subSchema.snapshot(snapshot, version);
  snapshot.subSchemaMap.put(subSchema.name, subSchemaSnapshot);
 }
 return snapshot;
}
origin: org.apache.drill.exec/drill-java-exec

@Override
public SchemaPlus plus() {
 return super.plus();
}
origin: org.apache.calcite/calcite-core

protected CalciteSchema snapshot(CalciteSchema parent, SchemaVersion version) {
 CalciteSchema snapshot = new SimpleCalciteSchema(parent,
   schema.snapshot(version), name, null, tableMap, latticeMap, typeMap,
   functionMap, functionNames, nullaryFunctionMap, getPath());
 for (CalciteSchema subSchema : subSchemaMap.map().values()) {
  CalciteSchema subSchemaSnapshot = subSchema.snapshot(snapshot, version);
  snapshot.subSchemaMap.put(subSchema.name, subSchemaSnapshot);
 }
 return snapshot;
}
origin: org.apache.calcite/calcite-core

public CalciteSchema add(String name, Schema schema) {
 final CalciteSchema calciteSchema =
   new SimpleCalciteSchema(this, schema, name);
 subSchemaMap.put(name, calciteSchema);
 return calciteSchema;
}
origin: org.apache.calcite/calcite-core

protected TableEntry getImplicitTable(String tableName,
  boolean caseSensitive) {
 // Check implicit tables.
 Table table = schema.getTable(tableName);
 if (table != null) {
  return tableEntry(tableName, table);
 }
 return null;
}
origin: Qihoo360/Quicksql

protected TypeEntry getImplicitType(String name, boolean caseSensitive) {
 // Check implicit types.
 RelProtoDataType type = schema.getType(name);
 if (type != null) {
  return typeEntry(name, type);
 }
 return null;
}
origin: org.apache.calcite/calcite-core

protected CalciteSchema getImplicitSubSchema(String schemaName,
  boolean caseSensitive) {
 // Check implicit schemas.
 Schema s = schema.getSubSchema(schemaName);
 if (s != null) {
  return new SimpleCalciteSchema(this, s, schemaName);
 }
 return null;
}
origin: Qihoo360/Quicksql

protected TableEntry getImplicitTableBasedOnNullaryFunction(String tableName,
  boolean caseSensitive) {
 Collection<Function> functions = schema.getFunctions(tableName);
 if (functions != null) {
  for (Function function : functions) {
   if (function instanceof TableMacro
     && function.getParameters().isEmpty()) {
    final Table table = ((TableMacro) function).apply(ImmutableList.of());
    return tableEntry(tableName, table);
   }
  }
 }
 return null;
}
origin: Qihoo360/Quicksql

protected CalciteSchema getImplicitSubSchema(String schemaName,
  boolean caseSensitive) {
 // Check implicit schemas.
 Schema s = schema.getSubSchema(schemaName);
 if (s != null) {
  return new SimpleCalciteSchema(this, s, schemaName);
 }
 return null;
}
origin: org.apache.calcite/calcite-core

protected TableEntry getImplicitTableBasedOnNullaryFunction(String tableName,
  boolean caseSensitive) {
 Collection<Function> functions = schema.getFunctions(tableName);
 if (functions != null) {
  for (Function function : functions) {
   if (function instanceof TableMacro
     && function.getParameters().isEmpty()) {
    final Table table = ((TableMacro) function).apply(ImmutableList.of());
    return tableEntry(tableName, table);
   }
  }
 }
 return null;
}
origin: Qihoo360/Quicksql

/** Creates a root schema.
 *
 * @param addMetadataSchema Whether to add a "metadata" schema containing
 *              definitions of tables, columns etc.
 * @param cache If true create {@link CachingCalciteSchema};
 *                if false create {@link SimpleCalciteSchema}
 * @param name Schema name
 */
public static CalciteSchema createRootSchema(boolean addMetadataSchema,
  boolean cache, String name) {
 CalciteSchema rootSchema;
 final Schema schema = new CalciteConnectionImpl.RootSchema();
 if (cache) {
  rootSchema = new CachingCalciteSchema(null, schema, name);
 } else {
  rootSchema = new SimpleCalciteSchema(null, schema, name);
 }
 if (addMetadataSchema) {
  rootSchema.add("metadata", MetadataSchema.INSTANCE);
 }
 return rootSchema;
}
origin: org.apache.calcite/calcite-core

/** Creates a root schema.
 *
 * @param addMetadataSchema Whether to add a "metadata" schema containing
 *              definitions of tables, columns etc.
 * @param cache If true create {@link CachingCalciteSchema};
 *                if false create {@link SimpleCalciteSchema}
 * @param name Schema name
 */
public static CalciteSchema createRootSchema(boolean addMetadataSchema,
  boolean cache, String name) {
 CalciteSchema rootSchema;
 final Schema schema = new CalciteConnectionImpl.RootSchema();
 if (cache) {
  rootSchema = new CachingCalciteSchema(null, schema, name);
 } else {
  rootSchema = new SimpleCalciteSchema(null, schema, name);
 }
 if (addMetadataSchema) {
  rootSchema.add("metadata", MetadataSchema.INSTANCE);
 }
 return rootSchema;
}
origin: org.apache.calcite/calcite-core

protected void addImplicitSubSchemaToBuilder(
  ImmutableSortedMap.Builder<String, CalciteSchema> builder) {
 ImmutableSortedMap<String, CalciteSchema> explicitSubSchemas = builder.build();
 for (String schemaName : schema.getSubSchemaNames()) {
  if (explicitSubSchemas.containsKey(schemaName)) {
   // explicit subschema wins.
   continue;
  }
  Schema s = schema.getSubSchema(schemaName);
  if (s != null) {
   CalciteSchema calciteSchema = new SimpleCalciteSchema(this, s, schemaName);
   builder.put(schemaName, calciteSchema);
  }
 }
}
origin: Qihoo360/Quicksql

protected void addImplicitSubSchemaToBuilder(
  ImmutableSortedMap.Builder<String, CalciteSchema> builder) {
 ImmutableSortedMap<String, CalciteSchema> explicitSubSchemas = builder.build();
 for (String schemaName : schema.getSubSchemaNames()) {
  if (explicitSubSchemas.containsKey(schemaName)) {
   // explicit subschema wins.
   continue;
  }
  Schema s = schema.getSubSchema(schemaName);
  if (s != null) {
   CalciteSchema calciteSchema = new SimpleCalciteSchema(this, s, schemaName);
   builder.put(schemaName, calciteSchema);
  }
 }
}
org.apache.calcite.jdbcSimpleCalciteSchema

Javadoc

A concrete implementation of org.apache.calcite.jdbc.CalciteSchemathat maintains minimal state.

Most used methods

  • <init>
  • getPath
  • tableEntry
  • typeEntry
  • plus

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
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