Skip to content

Commit f82a09a

Browse files
helfermarijnh
authored andcommitted
[sql mode] Add Spark MIME definition
1 parent 9571a1f commit f82a09a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mode/sql/sql.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,17 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
430430
dateSQL: set("date time timestamp"),
431431
support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")
432432
});
433+
434+
// Spark SQL
435+
CodeMirror.defineMIME("text/x-sparksql", {
436+
name: "sql",
437+
keywords: set("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases datata dbproperties defined delete delimited desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),
438+
builtin: set("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),
439+
atoms: set("false true null"),
440+
operatorChars: /^[*+\-%<>!=~&|^]/,
441+
dateSQL: set("date time timestamp"),
442+
support: set("ODBCdotTable doubleQuote zerolessFloat")
443+
});
433444
}());
434445

435446
});

0 commit comments

Comments
 (0)