Skip to content

Commit

Permalink
remove spatial functions section
Browse files Browse the repository at this point in the history
  • Loading branch information
drewdaemon committed Jun 7, 2024
1 parent 6fde98f commit 2e26b02
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 214 deletions.
212 changes: 0 additions & 212 deletions packages/kbn-text-based-editor/src/esql_documentation_sections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4134,218 +4134,6 @@ FROM employees
],
};

export const spatialFunctions = {
label: i18n.translate('textBasedEditor.query.textBasedLanguagesEditor.spatialFunctions', {
defaultMessage: 'Spatial functions',
}),
description: i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.spatialFunctionsDocumentationESQLDescription',
{
defaultMessage: `ES|QL supports these spatial functions:`,
}
),
items: [
{
label: i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.stcontainsFunction',
{
defaultMessage: 'ST_CONTAINS',
}
),
description: (
<Markdown
markdownContent={i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.stcontainsFunction.markdown',
{
defaultMessage: `### ST_CONTAINS
**WARNING: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.**
Returns whether the first geometry contains the second geometry.
This is the inverse of the \`ST_WITHIN\` function.
Example:
\`\`\`
FROM airport_city_boundaries
| WHERE ST_CONTAINS(city_boundary, TO_GEOSHAPE("POLYGON((109.35 18.3, 109.45 18.3, 109.45 18.4, 109.35 18.4, 109.35 18.3))"))
| KEEP abbrev, airport, region, city, city_location
\`\`\`
`,
description:
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
}
)}
/>
),
},
{
label: i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.stdisjointFunction',
{
defaultMessage: 'ST_DISJOINT',
}
),
description: (
<Markdown
markdownContent={i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.stdisjointFunction.markdown',
{
defaultMessage: `### ST_DISJOINT
**WARNING: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.**
Returns whether the two geometries or geometry columns are disjoint.
This is the inverse of the \`ST_INTERSECTS\` function.
Example:
\`\`\`
FROM airport_city_boundaries
| WHERE ST_DISJOINT(city_boundary, TO_GEOSHAPE("POLYGON((-10 -60, 120 -60, 120 60, -10 60, -10 -60))"))
| KEEP abbrev, airport, region, city, city_location
\`\`\`
`,
description:
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
}
)}
/>
),
},
{
label: i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.stintersectsFunction',
{
defaultMessage: 'ST_INTERSECTS',
}
),
description: (
<Markdown
markdownContent={i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.stintersectsFunction.markdown',
{
defaultMessage: `### ST_INTERSECTS
**WARNING: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.**
Returns true if two geometries intersect. They intersect if they have any point in common, including their interior points (points along lines or within polygons). This is the inverse of the \`ST_DISJOINT\` function.
Example:
\`\`\`
FROM airports
| WHERE ST_INTERSECTS(location, TO_GEOSHAPE("POLYGON((42 14, 43 14, 43 15, 42 15, 42 14))"))
\`\`\`
`,
description:
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
}
)}
/>
),
},
{
label: i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.stwithinFunction',
{
defaultMessage: 'ST_WITHIN',
}
),
description: (
<Markdown
markdownContent={i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.stwithinFunction.markdown',
{
defaultMessage: `### ST_WITHIN
**WARNING: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.**
Returns whether the first geometry is within the second geometry.
This is the inverse of the \`ST_CONTAINS\` function.
Example:
\`\`\`
FROM airport_city_boundaries
| WHERE ST_WITHIN(city_boundary, TO_GEOSHAPE("POLYGON((109.1 18.15, 109.6 18.15, 109.6 18.65, 109.1 18.65, 109.1 18.15))"))
| KEEP abbrev, airport, region, city, city_location
\`\`\`
`,
description:
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
}
)}
/>
),
},
{
label: i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.stxFunction',
{
defaultMessage: 'ST_X',
}
),
description: (
<Markdown
markdownContent={i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.stxFunction.markdown',
{
defaultMessage: `### ST_X
**WARNING: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.**
Extracts the \`x\` coordinate from the supplied point. If the point is of type \`geo_point\` this is equivalent to extracting the \`longitude\` value.
Example:
\`\`\`
ROW point = TO_GEOPOINT("POINT(42.97109629958868 14.7552534006536)")
| EVAL x = ST_X(point), y = ST_Y(point)
\`\`\`
`,
description:
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
}
)}
/>
),
},
{
label: i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.styFunction',
{
defaultMessage: 'ST_Y',
}
),
description: (
<Markdown
markdownContent={i18n.translate(
'textBasedEditor.query.textBasedLanguagesEditor.documentationESQL.styFunction.markdown',
{
defaultMessage: `### ST_Y
**WARNING: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.**
Extracts the \`y\` coordinate from the supplied point. If the point is of type \`geo_point\` this is equivalent to extracting the \`latitude\` value.
Example:
\`\`\`
ROW point = TO_GEOPOINT("POINT(42.97109629958868 14.7552534006536)")
| EVAL x = ST_X(point), y = ST_Y(point)
\`\`\`
`,
description:
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
}
)}
/>
),
},
],
};

export const operators = {
label: i18n.translate('textBasedEditor.query.textBasedLanguagesEditor.operators', {
defaultMessage: 'Operators',
Expand Down
2 changes: 0 additions & 2 deletions packages/kbn-text-based-editor/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ export const getDocumentationSections = async (language: string) => {
functions,
aggregationFunctions,
groupingFunctions,
spatialFunctions,
operators,
} = await import('./esql_documentation_sections');
groups.push({
Expand All @@ -172,7 +171,6 @@ export const getDocumentationSections = async (language: string) => {
functions,
aggregationFunctions,
groupingFunctions,
spatialFunctions,
operators
);
return {
Expand Down

0 comments on commit 2e26b02

Please sign in to comment.