Skip to content

Commit

Permalink
Fix prettier issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Grzegorz Kołakowski authored and bjornalm committed Feb 24, 2025
1 parent 70e8fc3 commit f6fa587
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 38 deletions.
52 changes: 18 additions & 34 deletions desktop/core/src/desktop/js/sql/reference/flink/udfReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,26 +112,23 @@ const STRING_FUNCTIONS: UdfCategoryFunctions = {
arguments: [[{ type: 'STRING' }]],
signature: 'char_length(STRING value)',
draggable: 'char_length()',
description:
"Returns the number of characters in STRING."
description: 'Returns the number of characters in STRING.'
},
character_length: {
name: 'character_length',
returnTypes: ['INTEGER'],
arguments: [[{ type: 'STRING' }]],
signature: 'character_length(STRING value)',
draggable: 'character_length()',
description:
"Returns the number of characters in STRING."
description: 'Returns the number of characters in STRING.'
},
lower: {
name: 'lower',
returnTypes: ['STRING'],
arguments: [[{ type: 'STRING' }]],
signature: 'lower(STRING value)',
draggable: 'lower()',
description:
"Returns string in lowercase."
description: 'Returns string in lowercase.'
},
regexp_extract: {
name: 'regexp_extract',
Expand All @@ -148,8 +145,7 @@ const STRING_FUNCTIONS: UdfCategoryFunctions = {
arguments: [[{ type: 'STRING' }]],
signature: 'upper(STRING value)',
draggable: 'upper()',
description:
"Returns string in uppercase."
description: 'Returns string in uppercase.'
}
};

Expand Down Expand Up @@ -517,28 +513,23 @@ const ARITHMETIC_FUNCTIONS: UdfCategoryFunctions = {
abs: {
name: 'abs',
returnTypes: ['NUMERIC'],
arguments: [[{ type: 'numeric'}]],
arguments: [[{ type: 'numeric' }]],
signature: 'abs(numeric)',
draggable: 'abs(numeric)',
description:
'Returns the absolute value of numeric.'
description: 'Returns the absolute value of numeric.'
},
ln: {
name: 'ln',
returnTypes: ['NUMERIC'],
arguments: [[{ type: 'numeric'}]],
arguments: [[{ type: 'numeric' }]],
signature: 'ln(numeric)',
draggable: 'ln(numeric)',
description:
'Returns the natural logarithm (base e) of numeric.'
description: 'Returns the natural logarithm (base e) of numeric.'
},
log: {
name: 'log',
returnTypes: ['NUMERIC'],
arguments: [
[{ type: 'numeric'}],
[{ type: 'numeric', optional: true }],
],
arguments: [[{ type: 'numeric' }], [{ type: 'numeric', optional: true }]],
signature: 'log(NUMERIC numeric1[, NUMERIC numeric2])',
draggable: 'log()',
description:
Expand All @@ -547,42 +538,35 @@ const ARITHMETIC_FUNCTIONS: UdfCategoryFunctions = {
log10: {
name: 'log10',
returnTypes: ['NUMERIC'],
arguments: [[{ type: 'numeric'}]],
arguments: [[{ type: 'numeric' }]],
signature: 'log10(NUMERIC numeric)',
draggable: 'log10()',
description:
'Returns the base 10 logarithm of numeric.'
description: 'Returns the base 10 logarithm of numeric.'
},
log2: {
name: 'log2',
returnTypes: ['NUMERIC'],
arguments: [[{ type: 'numeric'}]],
arguments: [[{ type: 'numeric' }]],
signature: 'log2(NUMERIC numeric)',
draggable: 'log2()',
description:
'Returns the base 2 logarithm of numeric.'
description: 'Returns the base 2 logarithm of numeric.'
},
power: {
name: 'power',
returnTypes: ['NUMERIC'],
arguments: [
[{ type: 'NUMERIC' }],
[{ type: 'NUMERIC' }],
],
arguments: [[{ type: 'NUMERIC' }], [{ type: 'NUMERIC' }]],
signature: 'power(NUMERIC numeric1, NUMERIC numeric2)',
draggable: 'power()',
description:
'Returns numeric1 raised to the power of numeric2 (numeric1^numeric2).'
description: 'Returns numeric1 raised to the power of numeric2 (numeric1^numeric2).'
},
sqrt: {
name: 'sqrt',
returnTypes: ['NUMERIC'],
arguments: [[{ type: 'numeric'}]],
arguments: [[{ type: 'numeric' }]],
signature: 'sqrt(NUMERIC numeric)',
draggable: 'sqrt()',
description:
'Returns the square root of numeric.'
},
description: 'Returns the square root of numeric.'
}
};

export const UDF_CATEGORIES: UdfCategory[] = [
Expand Down
6 changes: 2 additions & 4 deletions desktop/libs/notebook/src/notebook/connectors/flink_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import

import re
import json
import time
import logging
import posixpath
import re
import time

from desktop.auth.backend import rewrite_user
from desktop.lib.i18n import force_unicode
Expand Down

0 comments on commit f6fa587

Please sign in to comment.