congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Resources$Inst.str
Code IndexAdd Tabnine to your IDE (free)

How to use
str
method
in
org.apache.calcite.runtime.Resources$Inst

Best Java code snippets using org.apache.calcite.runtime.Resources$Inst.str (Showing top 17 results out of 315)

origin: Qihoo360/Quicksql

public static SqlDateLiteral parseDateLiteral(String s, SqlParserPos pos) {
 final String dateStr = parseString(s);
 final Calendar cal =
   DateTimeUtils.parseDateFormat(dateStr, Format.PER_THREAD.get().date,
     DateTimeUtils.UTC_ZONE);
 if (cal == null) {
  throw SqlUtil.newContextException(pos,
    RESOURCE.illegalLiteral("DATE", s,
      RESOURCE.badFormat(DateTimeUtils.DATE_FORMAT_STRING).str()));
 }
 final DateString d = DateString.fromCalendarFields(cal);
 return SqlLiteral.createDate(d, pos);
}
origin: org.apache.calcite/calcite-core

public static SqlDateLiteral parseDateLiteral(String s, SqlParserPos pos) {
 final String dateStr = parseString(s);
 final Calendar cal =
   DateTimeUtils.parseDateFormat(dateStr, Format.PER_THREAD.get().date,
     DateTimeUtils.UTC_ZONE);
 if (cal == null) {
  throw SqlUtil.newContextException(pos,
    RESOURCE.illegalLiteral("DATE", s,
      RESOURCE.badFormat(DateTimeUtils.DATE_FORMAT_STRING).str()));
 }
 final DateString d = DateString.fromCalendarFields(cal);
 return SqlLiteral.createDate(d, pos);
}
origin: Qihoo360/Quicksql

public static SqlTimeLiteral parseTimeLiteral(String s, SqlParserPos pos) {
 final String dateStr = parseString(s);
 final DateTimeUtils.PrecisionTime pt =
   DateTimeUtils.parsePrecisionDateTimeLiteral(dateStr,
     Format.PER_THREAD.get().time, DateTimeUtils.UTC_ZONE, -1);
 if (pt == null) {
  throw SqlUtil.newContextException(pos,
    RESOURCE.illegalLiteral("TIME", s,
      RESOURCE.badFormat(DateTimeUtils.TIME_FORMAT_STRING).str()));
 }
 final TimeString t = TimeString.fromCalendarFields(pt.getCalendar())
   .withFraction(pt.getFraction());
 return SqlLiteral.createTime(t, pt.getPrecision(), pos);
}
origin: Qihoo360/Quicksql

public static SqlTimestampLiteral parseTimestampLiteral(String s,
  SqlParserPos pos) {
 final String dateStr = parseString(s);
 final DateTimeUtils.PrecisionTime pt =
   DateTimeUtils.parsePrecisionDateTimeLiteral(dateStr,
     Format.PER_THREAD.get().timestamp, DateTimeUtils.UTC_ZONE, -1);
 if (pt == null) {
  throw SqlUtil.newContextException(pos,
    RESOURCE.illegalLiteral("TIMESTAMP", s,
      RESOURCE.badFormat(DateTimeUtils.TIMESTAMP_FORMAT_STRING).str()));
 }
 final TimestampString ts =
   TimestampString.fromCalendarFields(pt.getCalendar())
     .withFraction(pt.getFraction());
 return SqlLiteral.createTimestamp(ts, pt.getPrecision(), pos);
}
origin: org.apache.calcite/calcite-core

public static SqlTimeLiteral parseTimeLiteral(String s, SqlParserPos pos) {
 final String dateStr = parseString(s);
 final DateTimeUtils.PrecisionTime pt =
   DateTimeUtils.parsePrecisionDateTimeLiteral(dateStr,
     Format.PER_THREAD.get().time, DateTimeUtils.UTC_ZONE, -1);
 if (pt == null) {
  throw SqlUtil.newContextException(pos,
    RESOURCE.illegalLiteral("TIME", s,
      RESOURCE.badFormat(DateTimeUtils.TIME_FORMAT_STRING).str()));
 }
 final TimeString t = TimeString.fromCalendarFields(pt.getCalendar())
   .withFraction(pt.getFraction());
 return SqlLiteral.createTime(t, pt.getPrecision(), pos);
}
origin: Qihoo360/Quicksql

@Override public String toString() {
 return RESOURCE.parserContext(lineNumber, columnNumber).str();
}
origin: org.apache.calcite/calcite-core

public static SqlTimestampLiteral parseTimestampLiteral(String s,
  SqlParserPos pos) {
 final String dateStr = parseString(s);
 final DateTimeUtils.PrecisionTime pt =
   DateTimeUtils.parsePrecisionDateTimeLiteral(dateStr,
     Format.PER_THREAD.get().timestamp, DateTimeUtils.UTC_ZONE, -1);
 if (pt == null) {
  throw SqlUtil.newContextException(pos,
    RESOURCE.illegalLiteral("TIMESTAMP", s,
      RESOURCE.badFormat(DateTimeUtils.TIMESTAMP_FORMAT_STRING).str()));
 }
 final TimestampString ts =
   TimestampString.fromCalendarFields(pt.getCalendar())
     .withFraction(pt.getFraction());
 return SqlLiteral.createTimestamp(ts, pt.getPrecision(), pos);
}
origin: qubole/quark

SqlTimestampLiteral parseTimestampLiteral(String s, SqlParserPos pos) throws ParseException {
 String dateStr = SqlParserUtil.parseString(s);
 DateTimeUtils.PrecisionTime pt =
 DateTimeUtils.parsePrecisionDateTimeLiteral(
   dateStr, DateTimeUtils.TIMESTAMP_FORMAT_STRING, DateTimeUtils.GMT_ZONE);
 if (null == pt) {
   throw SqlUtil.newContextException(pos,
     RESOURCE.illegalLiteral("TIMESTAMP", s,
       RESOURCE.badFormat(DateTimeUtils.TIMESTAMP_FORMAT_STRING).str()));
 }
 return SqlLiteral.createTimestamp(pt.getCalendar(), pt.getPrecision(), pos);
}
origin: qubole/quark

SqlTimeLiteral parseTimeLiteral(String s, SqlParserPos pos) throws ParseException {
 String dateStr = SqlParserUtil.parseString(s);
 DateTimeUtils.PrecisionTime pt =
 DateTimeUtils.parsePrecisionDateTimeLiteral(
   dateStr, DateTimeUtils.TIME_FORMAT_STRING, DateTimeUtils.GMT_ZONE);
 if (null == pt) {
   throw SqlUtil.newContextException(pos,
     RESOURCE.illegalLiteral("TIME", s,
       RESOURCE.badFormat(DateTimeUtils.TIME_FORMAT_STRING).str()));
 }
 return SqlLiteral.createTime(pt.getCalendar(), pt.getPrecision(), pos);
}
origin: hortonworks/streamline

SqlTimeLiteral parseTimeLiteral(String s, SqlParserPos pos) throws ParseException {
 String dateStr = SqlParserUtil.parseString(s);
 DateTimeUtils.PrecisionTime pt =
 DateTimeUtils.parsePrecisionDateTimeLiteral(
   dateStr, DateTimeUtils.TIME_FORMAT_STRING, DateTimeUtils.GMT_ZONE);
 if (null == pt) {
   throw SqlUtil.newContextException(pos,
     RESOURCE.illegalLiteral("TIME", s,
       RESOURCE.badFormat(DateTimeUtils.TIME_FORMAT_STRING).str()));
 }
 return SqlLiteral.createTime(pt.getCalendar(), pt.getPrecision(), pos);
}
origin: hortonworks/streamline

SqlTimeLiteral parseTimeLiteral(String s, SqlParserPos pos) throws ParseException {
 String dateStr = SqlParserUtil.parseString(s);
 DateTimeUtils.PrecisionTime pt =
 DateTimeUtils.parsePrecisionDateTimeLiteral(
   dateStr, DateTimeUtils.TIME_FORMAT_STRING, DateTimeUtils.GMT_ZONE);
 if (null == pt) {
   throw SqlUtil.newContextException(pos,
     RESOURCE.illegalLiteral("TIME", s,
       RESOURCE.badFormat(DateTimeUtils.TIME_FORMAT_STRING).str()));
 }
 return SqlLiteral.createTime(pt.getCalendar(), pt.getPrecision(), pos);
}
origin: org.apache.calcite/calcite-core

@Override public String toString() {
 return RESOURCE.parserContext(lineNumber, columnNumber).str();
}
origin: hortonworks/streamline

SqlTimestampLiteral parseTimestampLiteral(String s, SqlParserPos pos) throws ParseException {
 String dateStr = SqlParserUtil.parseString(s);
 DateTimeUtils.PrecisionTime pt =
 DateTimeUtils.parsePrecisionDateTimeLiteral(
   dateStr, DateTimeUtils.TIMESTAMP_FORMAT_STRING, DateTimeUtils.GMT_ZONE);
 if (null == pt) {
   throw SqlUtil.newContextException(pos,
     RESOURCE.illegalLiteral("TIMESTAMP", s,
       RESOURCE.badFormat(DateTimeUtils.TIMESTAMP_FORMAT_STRING).str()));
 }
 return SqlLiteral.createTimestamp(pt.getCalendar(), pt.getPrecision(), pos);
}
origin: hortonworks/streamline

SqlDateLiteral parseDateLiteral(String s, SqlParserPos pos) throws ParseException {
 String dateStr = SqlParserUtil.parseString(s);
 Calendar cal = DateTimeUtils.parseDateFormat(
   dateStr, DateTimeUtils.DATE_FORMAT_STRING, DateTimeUtils.GMT_ZONE);
 if (null == cal) {
   throw SqlUtil.newContextException(pos,
     RESOURCE.illegalLiteral("DATE", s,
       RESOURCE.badFormat(DateTimeUtils.DATE_FORMAT_STRING).str()));
 }
 return SqlLiteral.createDate(cal, pos);
}
origin: qubole/quark

SqlDateLiteral parseDateLiteral(String s, SqlParserPos pos) throws ParseException {
 String dateStr = SqlParserUtil.parseString(s);
 Calendar cal = DateTimeUtils.parseDateFormat(
   dateStr, DateTimeUtils.DATE_FORMAT_STRING, DateTimeUtils.GMT_ZONE);
 if (null == cal) {
   throw SqlUtil.newContextException(pos,
     RESOURCE.illegalLiteral("DATE", s,
       RESOURCE.badFormat(DateTimeUtils.DATE_FORMAT_STRING).str()));
 }
 return SqlLiteral.createDate(cal, pos);
}
origin: hortonworks/streamline

SqlDateLiteral parseDateLiteral(String s, SqlParserPos pos) throws ParseException {
 String dateStr = SqlParserUtil.parseString(s);
 Calendar cal = DateTimeUtils.parseDateFormat(
   dateStr, DateTimeUtils.DATE_FORMAT_STRING, DateTimeUtils.GMT_ZONE);
 if (null == cal) {
   throw SqlUtil.newContextException(pos,
     RESOURCE.illegalLiteral("DATE", s,
       RESOURCE.badFormat(DateTimeUtils.DATE_FORMAT_STRING).str()));
 }
 return SqlLiteral.createDate(cal, pos);
}
origin: hortonworks/streamline

SqlTimestampLiteral parseTimestampLiteral(String s, SqlParserPos pos) throws ParseException {
 String dateStr = SqlParserUtil.parseString(s);
 DateTimeUtils.PrecisionTime pt =
 DateTimeUtils.parsePrecisionDateTimeLiteral(
   dateStr, DateTimeUtils.TIMESTAMP_FORMAT_STRING, DateTimeUtils.GMT_ZONE);
 if (null == pt) {
   throw SqlUtil.newContextException(pos,
     RESOURCE.illegalLiteral("TIMESTAMP", s,
       RESOURCE.badFormat(DateTimeUtils.TIMESTAMP_FORMAT_STRING).str()));
 }
 return SqlLiteral.createTimestamp(pt.getCalendar(), pt.getPrecision(), pos);
}
org.apache.calcite.runtimeResources$Inststr

Popular methods of Resources$Inst

  • <init>
  • bundle
  • countQuotesIn
  • raw
  • validate

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • Path (java.nio.file)
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JList (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top plugins for WebStorm
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