@@ -91,18 +91,6 @@ public TimesTenDialect(DialectResolutionInfo info) {
9191 super ( info );
9292 }
9393
94- /*
95- * Copyright (c) 2025, Oracle and/or its affiliates.
96- * Licensed under the Universal Permissive License v 1.0 as shown
97- * at http://oss.oracle.com/licenses/upl
98- *
99- * - Added more datatypes into columnType():
100- * BIT, CHAR, VARCHAR, LONGVARCHAR, BINARY, VARBINARY
101- * LONGVARBINARY, BINARY_FLOAT, BINARY_DOUBLE, TIMESTAMP,
102- * BLOB, CLOB, NCLOB
103- *
104- * @Author: Carlos Blanco
105- */
10694 @ Override
10795 protected String columnType (int sqlTypeCode ) {
10896 switch ( sqlTypeCode ) {
@@ -200,22 +188,6 @@ public int getDefaultDecimalPrecision() {
200188 return 40 ;
201189 }
202190
203- /*
204- * Copyright (c) 2025, Oracle and/or its affiliates.
205- * Licensed under the Universal Permissive License v 1.0 as shown
206- * at http://oss.oracle.com/licenses/upl
207- *
208- * - Added more SQL functions support into initializeFunctionRegistry():
209- * lower, upper, rtrim, ltrim, length, to_char, chr, instr, instrb,
210- * lpad, rpad, substr, substrb, substring, str, soundex, replace,
211- * to_date, sysdate, getdate, current_date, current_time, current_timestamp,
212- * to_timestamp, add_months, months_between, abs, acos, asin, atan, atan2,
213- * ceil, cos, cosh, exp, ln, sin, sign, sinh, mod, round, trunc, tan, tanh,
214- * floor, power, bitnot, bitor, bitxor, nvl, user, rowid, uid, rownum,
215- * vsize, SESSION_USER, SYSTEM_USER, CURRENT_USER
216- *
217- * @Author: Carlos Blanco
218- */
219191 @ Override
220192 public void initializeFunctionRegistry (FunctionContributions functionContributions ) {
221193 super .initializeFunctionRegistry (functionContributions );
@@ -232,16 +204,10 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
232204
233205 // String Functions
234206 functionContributions .getFunctionRegistry ().register (
235- "lower " , new StandardSQLFunction ("lower" )
207+ "rtrim " , new StandardSQLFunction ("rtrim" , StandardBasicTypes . STRING )
236208 );
237209 functionContributions .getFunctionRegistry ().register (
238- "upper" , new StandardSQLFunction ("upper" )
239- );
240- functionContributions .getFunctionRegistry ().register (
241- "rtrim" , new StandardSQLFunction ("rtrim" )
242- );
243- functionContributions .getFunctionRegistry ().register (
244- "ltrim" , new StandardSQLFunction ("ltrim" )
210+ "ltrim" , new StandardSQLFunction ("ltrim" , StandardBasicTypes .STRING )
245211 );
246212 functionContributions .getFunctionRegistry ().register (
247213 "length" , new StandardSQLFunction ("length" , StandardBasicTypes .LONG )
@@ -250,40 +216,16 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
250216 functionContributions .getFunctionRegistry ().register (
251217 "to_char" , new StandardSQLFunction ("to_char" , StandardBasicTypes .STRING )
252218 );
253- functionContributions .getFunctionRegistry ().register (
254- "chr" , new StandardSQLFunction ("chr" , StandardBasicTypes .CHARACTER )
255- );
256- functionContributions .getFunctionRegistry ().register (
257- "instr" , new StandardSQLFunction ("instr" , StandardBasicTypes .INTEGER )
258- );
259- functionContributions .getFunctionRegistry ().register (
260- "instrb" , new StandardSQLFunction ("instrb" , StandardBasicTypes .INTEGER )
261- );
262- functionContributions .getFunctionRegistry ().register (
263- "lpad" , new StandardSQLFunction ("lpad" , StandardBasicTypes .STRING )
264- );
265- functionContributions .getFunctionRegistry ().register (
266- "rpad" , new StandardSQLFunction ("rpad" , StandardBasicTypes .STRING )
267- );
268- functionContributions .getFunctionRegistry ().register (
269- "substr" , new StandardSQLFunction ("substr" , StandardBasicTypes .STRING )
270- );
271- functionContributions .getFunctionRegistry ().register (
272- "substrb" , new StandardSQLFunction ("substrb" , StandardBasicTypes .STRING )
273- );
274- functionContributions .getFunctionRegistry ().register (
275- "substring" , new StandardSQLFunction ( "substr" , StandardBasicTypes .STRING )
276- );
277- functionFactory .locate ();
219+ functionFactory .char_chr ();
220+ functionFactory .instr ();
221+ functionFactory .substr ();
278222 functionContributions .getFunctionRegistry ().register (
279223 "str" , new StandardSQLFunction ("to_char" , StandardBasicTypes .STRING )
280224 );
281225 functionContributions .getFunctionRegistry ().register (
282- "soundex" , new StandardSQLFunction ("soundex" )
283- );
284- functionContributions .getFunctionRegistry ().register (
285- "replace" , new StandardSQLFunction ("replace" , StandardBasicTypes .STRING )
226+ "substring" , new StandardSQLFunction ( "substr" , StandardBasicTypes .STRING )
286227 );
228+ functionFactory .soundex ();
287229
288230 // Date/Time Functions
289231 functionContributions .getFunctionRegistry ().register (
@@ -318,72 +260,21 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
318260 );
319261
320262 // Math functions
321- functionContributions .getFunctionRegistry ().register (
322- "abs" , new StandardSQLFunction ("abs" )
323- );
324- functionContributions .getFunctionRegistry ().register (
325- "acos" , new StandardSQLFunction ("acos" )
326- );
327- functionContributions .getFunctionRegistry ().register (
328- "asin" , new StandardSQLFunction ("asin" )
329- );
330- functionContributions .getFunctionRegistry ().register (
331- "atan" , new StandardSQLFunction ("atan" )
332- );
333- functionContributions .getFunctionRegistry ().register (
334- "atan2" , new StandardSQLFunction ("atan2" )
335- );
336- functionContributions .getFunctionRegistry ().register (
337- "ceil" , new StandardSQLFunction ("ceil" )
338- );
339- functionContributions .getFunctionRegistry ().register (
340- "cos" , new StandardSQLFunction ("cos" )
341- );
342- functionContributions .getFunctionRegistry ().register (
343- "cosh" , new StandardSQLFunction ("cosh" )
344- );
345- functionContributions .getFunctionRegistry ().register (
346- "exp" , new StandardSQLFunction ("exp" )
347- );
348- functionContributions .getFunctionRegistry ().register (
349- "ln" , new StandardSQLFunction ("ln" )
350- );
351- functionFactory .log ();
352- functionContributions .getFunctionRegistry ().register (
353- "sin" , new StandardSQLFunction ("sin" )
354- );
355- functionContributions .getFunctionRegistry ().register (
356- "sign" , new StandardSQLFunction ("sign" , StandardBasicTypes .INTEGER )
357- );
358- functionContributions .getFunctionRegistry ().register (
359- "sinh" , new StandardSQLFunction ("sinh" )
360- );
361- functionContributions .getFunctionRegistry ().register (
362- "mod" , new StandardSQLFunction ("mod" )
363- );
364- functionContributions .getFunctionRegistry ().register (
365- "round" , new StandardSQLFunction ("round" )
366- );
263+ functionFactory .ceiling_ceil ();
264+ functionFactory .radians_acos ();
265+ functionFactory .degrees_acos ();
266+ functionFactory .sinh ();
267+ functionFactory .tanh ();
367268 functionContributions .getFunctionRegistry ().register (
368269 "trunc" , new StandardSQLFunction ("trunc" )
369270 );
370271 functionContributions .getFunctionRegistry ().register (
371- "tan" , new StandardSQLFunction ("tan" )
372- );
373- functionContributions .getFunctionRegistry ().register (
374- "tanh" , new StandardSQLFunction ("tanh" )
375- );
376- functionContributions .getFunctionRegistry ().register (
377- "floor" , new StandardSQLFunction ("floor" )
378- );
379- functionContributions .getFunctionRegistry ().register (
380- "power" , new StandardSQLFunction ("power" , StandardBasicTypes .FLOAT )
272+ "round" , new StandardSQLFunction ("round" )
381273 );
382274
383275 // Bitwise functions
384- functionFactory .bitand ();
385276 functionContributions .getFunctionRegistry ().register (
386- "bitnot" , new StandardSQLFunction ("bitnot" )
277+ "bitnot" , new StandardSQLFunction ("bitnot" , StandardBasicTypes . INTEGER )
387278 );
388279
389280 functionContributions .getFunctionRegistry ()
@@ -404,7 +295,6 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
404295 functionContributions .getFunctionRegistry ().register (
405296 "nvl" , new StandardSQLFunction ("nvl" )
406297 );
407- functionFactory .coalesce ();
408298 functionContributions .getFunctionRegistry ().register (
409299 "user" , new CurrentFunction ("user" , "user" , stringType )
410300 );
@@ -418,7 +308,7 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
418308 "rownum" , new CurrentFunction ("rownum" , "rownum" , longType )
419309 );
420310 functionContributions .getFunctionRegistry ().register (
421- "vsize" , new StandardSQLFunction ("vsize" )
311+ "vsize" , new StandardSQLFunction ("vsize" , StandardBasicTypes . DOUBLE )
422312 );
423313 functionContributions .getFunctionRegistry ().register (
424314 "SESSION_USER" , new CurrentFunction ("SESSION_USER" ,"SESSION_USER" , stringType )
@@ -509,15 +399,6 @@ public RowLockStrategy getWriteRowLockStrategy() {
509399 }
510400
511401
512- /*
513- * Copyright (c) 2025, Oracle and/or its affiliates.
514- * Licensed under the Universal Permissive License v 1.0 as shown
515- * at http://oss.oracle.com/licenses/upl
516- *
517- * - Updated the custom definition for 'getForUpdateString()'
518- *
519- * @Author: Carlos Blanco
520- */
521402 @ Override
522403 public String getForUpdateString () {
523404 return " for update" ;
@@ -693,24 +574,6 @@ public String getSelectClauseNullString(int sqlType, TypeConfiguration typeConfi
693574 }
694575 }
695576
696- /*
697- * Copyright (c) 2025, Oracle and/or its affiliates.
698- * Licensed under the Universal Permissive License v 1.0 as shown
699- * at http://oss.oracle.com/licenses/upl
700- *
701- * - Added a custom definition for 'getNativeIdentifierGeneratorStrategy()'
702- * - Added a custom definition for 'currentDate()'
703- * - Added a custom definition for 'currentTime()'
704- * - Added a custom definition for 'getMaxVarcharLength()'
705- * - Added a custom definition for 'getMaxVarbinaryLength()'
706- * - Added a custom definition for 'isEmptyStringTreatedAsNull()'
707- * - Added a custom definition for 'supportsTupleDistinctCounts()'
708- * - Added a custom definition for 'getDual()'
709- * - Added a custom definition for 'getFromDualForSelectOnly()'
710- *
711- * @Author: Carlos Blanco
712- */
713-
714577 @ Override
715578 public String getNativeIdentifierGeneratorStrategy () {
716579 return "sequence" ;
@@ -748,10 +611,12 @@ public boolean supportsTupleDistinctCounts() {
748611 return false ;
749612 }
750613
614+ @ Override
751615 public String getDual () {
752616 return "dual" ;
753617 }
754618
619+ @ Override
755620 public String getFromDualForSelectOnly () {
756621 return " from dual" ;
757622 }
0 commit comments