Codota Logo
RelDataTypeFactory.createMultisetType
Code IndexAdd Codota to your IDE (free)

How to use
createMultisetType
method
in
org.apache.calcite.rel.type.RelDataTypeFactory

Best Java code snippets using org.apache.calcite.rel.type.RelDataTypeFactory.createMultisetType (Showing top 14 results out of 315)

  • Common ways to obtain RelDataTypeFactory
private void myMethod () {
RelDataTypeFactory r =
  • Codota IconRexBuilder rexBuilder;rexBuilder.getTypeFactory()
  • Codota IconSqlOperatorBinding opBinding;opBinding.getTypeFactory()
  • Codota IconRelOptCluster cluster;cluster.getTypeFactory()
  • Smart code suggestions by Codota
}
origin: org.apache.calcite/calcite-core

public static RelDataType createMultisetType(
  RelDataTypeFactory typeFactory,
  RelDataType type,
  boolean nullable) {
 RelDataType ret = typeFactory.createMultisetType(type, -1);
 return typeFactory.createTypeWithNullability(ret, nullable);
}
origin: Qihoo360/Quicksql

public static RelDataType createMultisetType(
  RelDataTypeFactory typeFactory,
  RelDataType type,
  boolean nullable) {
 RelDataType ret = typeFactory.createMultisetType(type, -1);
 return typeFactory.createTypeWithNullability(ret, nullable);
}
origin: org.apache.kylin/atopcalcite

public static RelDataType createMultisetType(
    RelDataTypeFactory typeFactory,
    RelDataType type,
    boolean nullable) {
  RelDataType ret = typeFactory.createMultisetType(type, -1);
  return typeFactory.createTypeWithNullability(ret, nullable);
}
origin: org.apache.calcite/calcite-core

protected RelDataType convertToStruct(RelDataType type) {
 // "MULTISET [<expr>, ...]" needs to be wrapped in a record if
 // <expr> has a scalar type.
 // For example, "MULTISET [8, 9]" has type
 // "RECORD(INTEGER EXPR$0 NOT NULL) NOT NULL MULTISET NOT NULL".
 final RelDataType componentType = type.getComponentType();
 if (componentType == null || componentType.isStruct()) {
  return type;
 }
 final RelDataTypeFactory typeFactory = validator.getTypeFactory();
 final RelDataType structType = toStruct(componentType, getNode());
 final RelDataType collectionType;
 switch (type.getSqlTypeName()) {
 case ARRAY:
  collectionType = typeFactory.createArrayType(structType, -1);
  break;
 case MULTISET:
  collectionType = typeFactory.createMultisetType(structType, -1);
  break;
 default:
  throw new AssertionError(type);
 }
 return typeFactory.createTypeWithNullability(collectionType,
   type.isNullable());
}
origin: Qihoo360/Quicksql

protected RelDataType convertToStruct(RelDataType type) {
 // "MULTISET [<expr>, ...]" needs to be wrapped in a record if
 // <expr> has a scalar type.
 // For example, "MULTISET [8, 9]" has type
 // "RECORD(INTEGER EXPR$0 NOT NULL) NOT NULL MULTISET NOT NULL".
 final RelDataType componentType = type.getComponentType();
 if (componentType == null || componentType.isStruct()) {
  return type;
 }
 final RelDataTypeFactory typeFactory = validator.getTypeFactory();
 final RelDataType structType = toStruct(componentType, getNode());
 final RelDataType collectionType;
 switch (type.getSqlTypeName()) {
 case ARRAY:
  collectionType = typeFactory.createArrayType(structType, -1);
  break;
 case MULTISET:
  collectionType = typeFactory.createMultisetType(structType, -1);
  break;
 default:
  throw new AssertionError(type);
 }
 return typeFactory.createTypeWithNullability(collectionType,
   type.isNullable());
}
origin: org.apache.kylin/atopcalcite

typeFactory.createMultisetType(
    flattenRecordType(
        typeFactory,
origin: Qihoo360/Quicksql

type = typeFactory.createMultisetType(type, -1);
break;
origin: org.apache.calcite/calcite-core

type = typeFactory.createMultisetType(type, -1);
break;
origin: Qihoo360/Quicksql

typeFactory.createMultisetType(
  flattenRecordType(
    typeFactory,
origin: org.apache.calcite/calcite-core

typeFactory.createMultisetType(
  flattenRecordType(
    typeFactory,
origin: org.apache.calcite/calcite-core

  componentType.isNullable());
boolean isn = type.isNullable();
type = typeFactory.createMultisetType(tt, -1);
type = typeFactory.createTypeWithNullability(type, isn);
origin: Qihoo360/Quicksql

  componentType.isNullable());
boolean isn = type.isNullable();
type = typeFactory.createMultisetType(tt, -1);
type = typeFactory.createTypeWithNullability(type, isn);
origin: Qihoo360/Quicksql

@Test public void testTypeDump() {
 RelDataTypeFactory typeFactory =
   new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
 RelDataType t1 =
   typeFactory.builder()
     .add("f0", SqlTypeName.DECIMAL, 5, 2)
     .add("f1", SqlTypeName.VARCHAR, 10)
     .build();
 TestUtil.assertEqualsVerbose(
   TestUtil.fold(
     "f0 DECIMAL(5, 2) NOT NULL,",
     "f1 VARCHAR(10) CHARACTER SET \"ISO-8859-1\" COLLATE \"ISO-8859-1$en_US$primary\" NOT NULL"),
   Util.toLinux(RelOptUtil.dumpType(t1) + "\n"));
 RelDataType t2 =
   typeFactory.builder()
     .add("f0", t1)
     .add("f1", typeFactory.createMultisetType(t1, -1))
     .build();
 TestUtil.assertEqualsVerbose(
   TestUtil.fold(
     "f0 RECORD (",
     "  f0 DECIMAL(5, 2) NOT NULL,",
     "  f1 VARCHAR(10) CHARACTER SET \"ISO-8859-1\" COLLATE \"ISO-8859-1$en_US$primary\" NOT NULL) NOT NULL,",
     "f1 RECORD (",
     "  f0 DECIMAL(5, 2) NOT NULL,",
     "  f1 VARCHAR(10) CHARACTER SET \"ISO-8859-1\" COLLATE \"ISO-8859-1$en_US$primary\" NOT NULL) NOT NULL MULTISET NOT NULL"),
   Util.toLinux(RelOptUtil.dumpType(t2) + "\n"));
}
origin: org.apache.calcite/calcite-core

@Test public void testTypeDump() {
 RelDataTypeFactory typeFactory =
   new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
 RelDataType t1 =
   typeFactory.builder()
     .add("f0", SqlTypeName.DECIMAL, 5, 2)
     .add("f1", SqlTypeName.VARCHAR, 10)
     .build();
 TestUtil.assertEqualsVerbose(
   TestUtil.fold(
     "f0 DECIMAL(5, 2) NOT NULL,",
     "f1 VARCHAR(10) CHARACTER SET \"ISO-8859-1\" COLLATE \"ISO-8859-1$en_US$primary\" NOT NULL"),
   Util.toLinux(RelOptUtil.dumpType(t1) + "\n"));
 RelDataType t2 =
   typeFactory.builder()
     .add("f0", t1)
     .add("f1", typeFactory.createMultisetType(t1, -1))
     .build();
 TestUtil.assertEqualsVerbose(
   TestUtil.fold(
     "f0 RECORD (",
     "  f0 DECIMAL(5, 2) NOT NULL,",
     "  f1 VARCHAR(10) CHARACTER SET \"ISO-8859-1\" COLLATE \"ISO-8859-1$en_US$primary\" NOT NULL) NOT NULL,",
     "f1 RECORD (",
     "  f0 DECIMAL(5, 2) NOT NULL,",
     "  f1 VARCHAR(10) CHARACTER SET \"ISO-8859-1\" COLLATE \"ISO-8859-1$en_US$primary\" NOT NULL) NOT NULL MULTISET NOT NULL"),
   Util.toLinux(RelOptUtil.dumpType(t2) + "\n"));
}
org.apache.calcite.rel.typeRelDataTypeFactorycreateMultisetType

Javadoc

Creates a multiset type. Multisets are unordered collections of elements.

Popular methods of RelDataTypeFactory

  • createSqlType
    Creates a SQL type with precision and scale.
  • createTypeWithNullability
    Creates a type that is the same as another type but with possibly different nullability. The output
  • createStructType
    Creates a type that represents a structured collection of fields, given lists of the names and types
  • builder
    Creates a org.apache.calcite.rel.type.RelDataTypeFactory.FieldInfoBuilder. But since FieldInfoBuilde
  • createMapType
    Creates a map type. Maps are unordered collections of key/value pairs.
  • getTypeSystem
    Returns the type system.
  • createArrayType
    Creates an array type. Arrays are ordered collections of elements.
  • createJavaType
    Creates a type that corresponds to a Java class.
  • createSqlIntervalType
    Creates a SQL interval type.
  • createTypeWithCharsetAndCollation
    Creates a type that is the same as another type but with possibly different charset or collation. Fo
  • leastRestrictive
    Returns the most general of a set of types (that is, one type to which they can all be cast), or nul
  • copyType
    Duplicates a type, making a deep copy. Normally, this is a no-op, since canonical type objects are r
  • leastRestrictive,
  • copyType,
  • createUnknownType,
  • getDefaultCharset,
  • createJoinType,
  • useDoubleMultiplication

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • onRequestPermissionsResult (Fragment)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
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