congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Hook$Closeable
Code IndexAdd Tabnine to your IDE (free)

How to use
Hook$Closeable
in
org.apache.calcite.runtime

Best Java code snippets using org.apache.calcite.runtime.Hook$Closeable (Showing top 11 results out of 315)

origin: org.apache.calcite/calcite-core

@Test public void testLocalTimeFunc() {
 tester.setFor(SqlStdOperatorTable.LOCALTIME);
 tester.checkScalar("LOCALTIME", TIME_PATTERN, "TIME(0) NOT NULL");
 tester.checkFails(
   "^LOCALTIME()^",
   "No match found for function signature LOCALTIME\\(\\)",
   false);
 tester.checkScalar(
   "LOCALTIME(1)", TIME_PATTERN,
   "TIME(1) NOT NULL");
 final Pair<String, Hook.Closeable> pair = currentTimeString(LOCAL_TZ);
 tester.checkScalar(
   "CAST(LOCALTIME AS VARCHAR(30))",
   Pattern.compile(
     pair.left.substring(11) + "[0-9][0-9]:[0-9][0-9]"),
   "VARCHAR(30) NOT NULL");
 tester.checkScalar(
   "LOCALTIME",
   Pattern.compile(
     pair.left.substring(11) + "[0-9][0-9]:[0-9][0-9]"),
   "TIME(0) NOT NULL");
 pair.right.close();
}
origin: org.apache.calcite/calcite-core

  Pattern.compile(pair.left + "[0-9][0-9]:[0-9][0-9]"),
  "TIMESTAMP(0) NOT NULL");
pair.right.close();
origin: Qihoo360/Quicksql

  Pattern.compile(pair.left + "[0-9][0-9]:[0-9][0-9]"),
  "TIMESTAMP(0) NOT NULL");
pair.right.close();
origin: org.apache.calcite/calcite-core

@Test public void testCurrentTimestampFunc() {
 tester.setFor(SqlStdOperatorTable.CURRENT_TIMESTAMP);
 tester.checkScalar(
   "CURRENT_TIMESTAMP", TIMESTAMP_PATTERN,
   "TIMESTAMP(0) NOT NULL");
 tester.checkFails(
   "^CURRENT_TIMESTAMP()^",
   "No match found for function signature CURRENT_TIMESTAMP\\(\\)",
   false);
 tester.checkFails(
   "^CURRENT_TIMESTAMP(4000000000)^", LITERAL_OUT_OF_RANGE_MESSAGE, false);
 tester.checkScalar(
   "CURRENT_TIMESTAMP(1)", TIMESTAMP_PATTERN,
   "TIMESTAMP(1) NOT NULL");
 final Pair<String, Hook.Closeable> pair = currentTimeString(
   CURRENT_TZ);
 tester.checkScalar(
   "CAST(CURRENT_TIMESTAMP AS VARCHAR(30))",
   Pattern.compile(pair.left + "[0-9][0-9]:[0-9][0-9]"),
   "VARCHAR(30) NOT NULL");
 tester.checkScalar(
   "CURRENT_TIMESTAMP",
   Pattern.compile(pair.left + "[0-9][0-9]:[0-9][0-9]"),
   "TIMESTAMP(0) NOT NULL");
 pair.right.close();
}
origin: Qihoo360/Quicksql

@Test public void testLocalTimeFunc() {
 tester.setFor(SqlStdOperatorTable.LOCALTIME);
 tester.checkScalar("LOCALTIME", TIME_PATTERN, "TIME(0) NOT NULL");
 tester.checkFails(
   "^LOCALTIME()^",
   "No match found for function signature LOCALTIME\\(\\)",
   false);
 tester.checkScalar(
   "LOCALTIME(1)", TIME_PATTERN,
   "TIME(1) NOT NULL");
 final Pair<String, Hook.Closeable> pair = currentTimeString(LOCAL_TZ);
 tester.checkScalar(
   "CAST(LOCALTIME AS VARCHAR(30))",
   Pattern.compile(
     pair.left.substring(11) + "[0-9][0-9]:[0-9][0-9]"),
   "VARCHAR(30) NOT NULL");
 tester.checkScalar(
   "LOCALTIME",
   Pattern.compile(
     pair.left.substring(11) + "[0-9][0-9]:[0-9][0-9]"),
   "TIME(0) NOT NULL");
 pair.right.close();
}
origin: org.apache.calcite/calcite-core

@Test public void testCurrentTimeFunc() {
 tester.setFor(SqlStdOperatorTable.CURRENT_TIME);
 tester.checkScalar(
   "CURRENT_TIME", TIME_PATTERN,
   "TIME(0) NOT NULL");
 tester.checkFails(
   "^CURRENT_TIME()^",
   "No match found for function signature CURRENT_TIME\\(\\)",
   false);
 tester.checkScalar(
   "CURRENT_TIME(1)", TIME_PATTERN, "TIME(1) NOT NULL");
 final Pair<String, Hook.Closeable> pair = currentTimeString(CURRENT_TZ);
 tester.checkScalar(
   "CAST(CURRENT_TIME AS VARCHAR(30))",
   Pattern.compile(pair.left.substring(11) + "[0-9][0-9]:[0-9][0-9]"),
   "VARCHAR(30) NOT NULL");
 tester.checkScalar(
   "CURRENT_TIME",
   Pattern.compile(pair.left.substring(11) + "[0-9][0-9]:[0-9][0-9]"),
   "TIME(0) NOT NULL");
 pair.right.close();
}
origin: Qihoo360/Quicksql

@Test public void testCurrentTimestampFunc() {
 tester.setFor(SqlStdOperatorTable.CURRENT_TIMESTAMP);
 tester.checkScalar(
   "CURRENT_TIMESTAMP", TIMESTAMP_PATTERN,
   "TIMESTAMP(0) NOT NULL");
 tester.checkFails(
   "^CURRENT_TIMESTAMP()^",
   "No match found for function signature CURRENT_TIMESTAMP\\(\\)",
   false);
 tester.checkFails(
   "^CURRENT_TIMESTAMP(4000000000)^", LITERAL_OUT_OF_RANGE_MESSAGE, false);
 tester.checkScalar(
   "CURRENT_TIMESTAMP(1)", TIMESTAMP_PATTERN,
   "TIMESTAMP(1) NOT NULL");
 final Pair<String, Hook.Closeable> pair = currentTimeString(
   CURRENT_TZ);
 tester.checkScalar(
   "CAST(CURRENT_TIMESTAMP AS VARCHAR(30))",
   Pattern.compile(pair.left + "[0-9][0-9]:[0-9][0-9]"),
   "VARCHAR(30) NOT NULL");
 tester.checkScalar(
   "CURRENT_TIMESTAMP",
   Pattern.compile(pair.left + "[0-9][0-9]:[0-9][0-9]"),
   "TIMESTAMP(0) NOT NULL");
 pair.right.close();
}
origin: Qihoo360/Quicksql

@Test public void testCurrentTimeFunc() {
 tester.setFor(SqlStdOperatorTable.CURRENT_TIME);
 tester.checkScalar(
   "CURRENT_TIME", TIME_PATTERN,
   "TIME(0) NOT NULL");
 tester.checkFails(
   "^CURRENT_TIME()^",
   "No match found for function signature CURRENT_TIME\\(\\)",
   false);
 tester.checkScalar(
   "CURRENT_TIME(1)", TIME_PATTERN, "TIME(1) NOT NULL");
 final Pair<String, Hook.Closeable> pair = currentTimeString(CURRENT_TZ);
 tester.checkScalar(
   "CAST(CURRENT_TIME AS VARCHAR(30))",
   Pattern.compile(pair.left.substring(11) + "[0-9][0-9]:[0-9][0-9]"),
   "VARCHAR(30) NOT NULL");
 tester.checkScalar(
   "CURRENT_TIME",
   Pattern.compile(pair.left.substring(11) + "[0-9][0-9]:[0-9][0-9]"),
   "TIME(0) NOT NULL");
 pair.right.close();
}
origin: tzolov/calcite-sql-rewriter

public static synchronized void removeHook() {
  if (globalProgramClosable != null) {
    globalProgramClosable.close();
    globalProgramClosable = null;
  }
}
origin: org.apache.calcite/calcite-core

@After public void after() {
 if (this.closeable != null) {
  this.closeable.close();
  this.closeable = null;
 }
}
origin: Qihoo360/Quicksql

@After public void after() {
 if (this.closeable != null) {
  this.closeable.close();
  this.closeable = null;
 }
}
org.apache.calcite.runtimeHook$Closeable

Javadoc

Removes a Hook after use.

Most used methods

  • close

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • JOptionPane (javax.swing)
  • 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
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now