mirror of
https://github.com/enso-org/enso.git
synced 2024-09-11 13:15:52 +03:00
Restructure Standard.Table. (#9559)
Move the types from `Standard.Table.Data` to `Standard.Table`. Exceptions: - `Standard.Table.Data.Report_Unmatched` => `Standard.Table.Constants`. - `Standard.Table.Data.Join_Kind_Cross` => `Standard.Table.Internal.Join_Kind_Cross`. Also removed constructor as an atom type. - `Standard.Table.Extensions.Table_Ref` => `Standard.Table.Internal.Table_Ref`. - `Standard.Table.Data.Type.Value_Type_Helpers` => `Standard.Table.Internal.Value_Type_Helpers`. - `Standard.Table.Data.Type.Enso_Types` => `Standard.Table.Internal.Value_Type_Helpers`. - `Standard.Table.Data.Type.Storage` => `Standard.Table.Internal.Storage`. Changed all `Standard.Table` imports inside project to be project. Favoured importing from `Standard.Table.Main` in `Standard.Database`. Also fixed some linting in Enso_File.
This commit is contained in:
parent
8f7866896b
commit
e262801daa
@ -10,7 +10,7 @@ import { graphNodeByBinding } from './locate'
|
||||
*/
|
||||
async function initGraph(page: Page) {
|
||||
await actions.goToGraph(page)
|
||||
await mockExpressionUpdate(page, 'aggregated', { type: 'Standard.Table.Data.Table.Table' })
|
||||
await mockExpressionUpdate(page, 'aggregated', { type: 'Standard.Table.Table.Table' })
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,8 +62,8 @@ test('Multi-selection widget', async ({ page }) => {
|
||||
await actions.goToGraph(page)
|
||||
await mockMethodCallInfo(page, 'selected', {
|
||||
methodPointer: {
|
||||
module: 'Standard.Table.Data.Table',
|
||||
definedOnType: 'Standard.Table.Data.Table.Table',
|
||||
module: 'Standard.Table.Table',
|
||||
definedOnType: 'Standard.Table.Table.Table',
|
||||
name: 'select_columns',
|
||||
},
|
||||
notAppliedArguments: [1],
|
||||
@ -284,8 +284,8 @@ test('Managing aggregates in `aggregate` node', async ({ page }) => {
|
||||
await actions.goToGraph(page)
|
||||
await mockMethodCallInfo(page, 'aggregated', {
|
||||
methodPointer: {
|
||||
module: 'Standard.Table.Data.Table',
|
||||
definedOnType: 'Standard.Table.Data.Table.Table',
|
||||
module: 'Standard.Table.Table',
|
||||
definedOnType: 'Standard.Table.Table.Table',
|
||||
name: 'aggregate',
|
||||
},
|
||||
notAppliedArguments: [1, 2, 3],
|
||||
@ -317,8 +317,8 @@ test('Managing aggregates in `aggregate` node', async ({ page }) => {
|
||||
},
|
||||
{
|
||||
methodPointer: {
|
||||
module: 'Standard.Table.Data.Aggregate_Column',
|
||||
definedOnType: 'Standard.Table.Data.Aggregate_Column.Aggregate_Column',
|
||||
module: 'Standard.Table.Aggregate_Column',
|
||||
definedOnType: 'Standard.Table.Aggregate_Column.Aggregate_Column',
|
||||
name: 'Group_By',
|
||||
},
|
||||
notAppliedArguments: [0, 1],
|
||||
@ -343,8 +343,8 @@ test('Managing aggregates in `aggregate` node', async ({ page }) => {
|
||||
},
|
||||
{
|
||||
methodPointer: {
|
||||
module: 'Standard.Table.Data.Aggregate_Column',
|
||||
definedOnType: 'Standard.Table.Data.Aggregate_Column.Aggregate_Column',
|
||||
module: 'Standard.Table.Aggregate_Column',
|
||||
definedOnType: 'Standard.Table.Aggregate_Column.Aggregate_Column',
|
||||
name: 'Count_Distinct',
|
||||
},
|
||||
notAppliedArguments: [0, 1, 2],
|
||||
@ -381,8 +381,8 @@ test('Managing aggregates in `aggregate` node', async ({ page }) => {
|
||||
},
|
||||
{
|
||||
methodPointer: {
|
||||
module: 'Standard.Table.Data.Aggregate_Column',
|
||||
definedOnType: 'Standard.Table.Data.Aggregate_Column.Aggregate_Column',
|
||||
module: 'Standard.Table.Aggregate_Column',
|
||||
definedOnType: 'Standard.Table.Aggregate_Column.Aggregate_Column',
|
||||
name: 'Group_By',
|
||||
},
|
||||
notAppliedArguments: [0, 1],
|
||||
|
@ -238,7 +238,7 @@ const mockVizData: Record<string, Uint8Array | ((params: string[]) => Uint8Array
|
||||
{
|
||||
type: 'Choice',
|
||||
constructor: 'Option',
|
||||
value: 'Standard.Table.Data.Aggregate_Column.Aggregate_Column.Group_By',
|
||||
value: 'Standard.Table.Aggregate_Column.Aggregate_Column.Group_By',
|
||||
label: null,
|
||||
parameters: [
|
||||
[
|
||||
@ -271,14 +271,14 @@ const mockVizData: Record<string, Uint8Array | ((params: string[]) => Uint8Array
|
||||
{
|
||||
type: 'Choice',
|
||||
constructor: 'Option',
|
||||
value: 'Standard.Table.Data.Aggregate_Column.Aggregate_Column.Count',
|
||||
value: 'Standard.Table.Aggregate_Column.Aggregate_Column.Count',
|
||||
label: null,
|
||||
parameters: [],
|
||||
},
|
||||
{
|
||||
type: 'Choice',
|
||||
constructor: 'Option',
|
||||
value: 'Standard.Table.Data.Aggregate_Column.Aggregate_Column.Count_Distinct',
|
||||
value: 'Standard.Table.Aggregate_Column.Aggregate_Column.Count_Distinct',
|
||||
label: null,
|
||||
parameters: [
|
||||
[
|
||||
|
@ -23,9 +23,9 @@ test.each([
|
||||
[makeModuleMethod('Standard.Base.Data.read'), 'Data.read'],
|
||||
[makeStaticMethod('Standard.Base.Data.Vector.new'), 'Vector.new'],
|
||||
[makeMethod('Standard.Base.Data.Vector.get'), 'get'],
|
||||
[makeConstructor('Standard.Table.Data.Join_Kind.Join_Kind.LeftInner'), 'Join_Kind.LeftInner'],
|
||||
[makeModule('Standard.Table.Data.Join_Kind'), 'Join_Kind'],
|
||||
[makeModule('Standard.Table.Data'), 'Data', 'Standard.Table.Data'],
|
||||
[makeConstructor('Standard.Table.Join_Kind.Join_Kind.Inner'), 'Join_Kind.Inner'],
|
||||
[makeModule('Standard.Table.Excel.Excel_Range'), 'Excel_Range'],
|
||||
[makeModule('Standard.Table.Conversions'), 'Conversions', 'Standard.Table.Conversions'],
|
||||
[makeModuleMethod('local.Project.main'), 'Project.main'],
|
||||
])("$name Component's label is valid", (suggestion, expected, mainExpected?) => {
|
||||
const mainView = new Filtering({})
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
export const name = 'Geo Map'
|
||||
export const icon = 'compass'
|
||||
export const inputType = 'Standard.Table.Data.Table.Table'
|
||||
export const inputType = 'Standard.Table.Table.Table'
|
||||
export const defaultPreprocessor = [
|
||||
'Standard.Visualization.Geo_Map',
|
||||
'process_to_json_text',
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
export const name = 'Heatmap'
|
||||
export const icon = 'heatmap'
|
||||
export const inputType = 'Standard.Table.Data.Table.Table | Standard.Base.Data.Vector.Vector'
|
||||
export const inputType = 'Standard.Table.Table.Table | Standard.Base.Data.Vector.Vector'
|
||||
export const defaultPreprocessor = [
|
||||
'Standard.Visualization.Table.Visualization',
|
||||
'prepare_visualization',
|
||||
|
@ -8,7 +8,7 @@ import { computed, ref, watch, watchEffect, watchPostEffect } from 'vue'
|
||||
|
||||
export const name = 'Histogram'
|
||||
export const inputType =
|
||||
'Standard.Table.Data.Table.Table | Standard.Base.Data.Vector.Vector | Standard.Image.Histogram.Histogram'
|
||||
'Standard.Table.Table.Table | Standard.Base.Data.Vector.Vector | Standard.Image.Histogram.Histogram'
|
||||
export const defaultPreprocessor = [
|
||||
'Standard.Visualization.Histogram',
|
||||
'process_to_json_text',
|
||||
|
@ -10,7 +10,7 @@ import { computed, ref, watch, watchEffect, watchPostEffect } from 'vue'
|
||||
|
||||
export const name = 'Scatter Plot'
|
||||
export const icon = 'points'
|
||||
export const inputType = 'Standard.Table.Data.Table.Table | Standard.Base.Data.Vector.Vector'
|
||||
export const inputType = 'Standard.Table.Table.Table | Standard.Base.Data.Vector.Vector'
|
||||
const DEFAULT_LIMIT = 1024
|
||||
export const defaultPreprocessor = [
|
||||
'Standard.Visualization.Scatter_Plot',
|
||||
|
@ -2,7 +2,7 @@
|
||||
export const name = 'Table'
|
||||
export const icon = 'table'
|
||||
export const inputType =
|
||||
'Standard.Table.Data.Table.Table | Standard.Table.Data.Column.Column | Standard.Table.Data.Row.Row |Standard.Base.Data.Vector.Vector | Standard.Base.Data.Array.Array | Standard.Base.Data.Map.Map | Any'
|
||||
'Standard.Table.Table.Table | Standard.Table.Column.Column | Standard.Table.Row.Row | Standard.Base.Data.Vector.Vector | Standard.Base.Data.Array.Array | Standard.Base.Data.Map.Map | Any'
|
||||
export const defaultPreprocessor = [
|
||||
'Standard.Visualization.Table.Visualization',
|
||||
'prepare_visualization',
|
||||
@ -236,7 +236,17 @@ function toRender(content: unknown) {
|
||||
}
|
||||
|
||||
watchEffect(() => {
|
||||
const data_ = props.data
|
||||
// If the user switches from one visualization type to another, we can receive the raw object.
|
||||
const data_ =
|
||||
typeof props.data === 'object' ?
|
||||
props.data
|
||||
: {
|
||||
type: typeof props.data,
|
||||
json: props.data,
|
||||
all_rows_count: 1,
|
||||
data: undefined,
|
||||
indices: undefined,
|
||||
}
|
||||
const options = agGridOptions.value
|
||||
if (options.api == null) {
|
||||
return
|
||||
@ -288,7 +298,7 @@ watchEffect(() => {
|
||||
} else if (Array.isArray(data_.json)) {
|
||||
columnDefs = [indexField(), toField('Value')]
|
||||
rowData = data_.json.map((row, i) => ({ [INDEX_FIELD_NAME]: i, Value: toRender(row) }))
|
||||
isTruncated.value = data_.all_rows_count !== data_.json.length
|
||||
isTruncated.value = data_.all_rows_count ? data_.all_rows_count !== data_.json.length : false
|
||||
} else if (data_.json !== undefined) {
|
||||
columnDefs = [toField('Value')]
|
||||
rowData = [{ Value: toRender(data_.json) }]
|
||||
|
@ -1023,13 +1023,13 @@
|
||||
},
|
||||
{
|
||||
"type": "module",
|
||||
"module": "Standard.Table.Data.Table",
|
||||
"module": "Standard.Table.Excel.Excel_Range",
|
||||
"documentation": null,
|
||||
"reexport": "Standard.Table.Data"
|
||||
"reexport": "Standard.Table.Excel "
|
||||
},
|
||||
{
|
||||
"type": "type",
|
||||
"module": "Standard.Table.Data.Table",
|
||||
"module": "Standard.Table.Table",
|
||||
"name": "Table",
|
||||
"params": [],
|
||||
"parentType": "Standard.Base.Any.Any",
|
||||
@ -1038,23 +1038,23 @@
|
||||
},
|
||||
{
|
||||
"type": "method",
|
||||
"module": "Standard.Table.Data.Table",
|
||||
"module": "Standard.Table.Table",
|
||||
"name": "new",
|
||||
"arguments": [],
|
||||
"selfType": "Standard.Table.Data.Table.Table",
|
||||
"returnType": "Standard.Table.Data.Table.Table",
|
||||
"selfType": "Standard.Table.Table.Table",
|
||||
"returnType": "Standard.Table.Table.Table",
|
||||
"isStatic": true,
|
||||
"documentation": "",
|
||||
"annotations": []
|
||||
},
|
||||
{
|
||||
"type": "method",
|
||||
"module": "Standard.Table.Data.Table",
|
||||
"module": "Standard.Table.Table",
|
||||
"name": "aggregate",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "self",
|
||||
"reprType": "Standard.Table.Data.Table.Table",
|
||||
"reprType": "Standard.Table.Table.Table",
|
||||
"isSuspended": false,
|
||||
"hasDefault": false,
|
||||
"defaultValue": null,
|
||||
@ -1062,7 +1062,7 @@
|
||||
},
|
||||
{
|
||||
"name": "columns",
|
||||
"reprType": "Standard.Base.Data.Vector.Vector Standard.Table.Data.Aggregate_Column.Aggregate_Column",
|
||||
"reprType": "Standard.Base.Data.Vector.Vector Standard.Table.Aggregate_Column.Aggregate_Column",
|
||||
"isSuspended": false,
|
||||
"hasDefault": false,
|
||||
"defaultValue": null,
|
||||
@ -1092,7 +1092,7 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"selfType": "Standard.Table.Data.Table.Table",
|
||||
"selfType": "Standard.Table.Table.Table",
|
||||
"returnType": "Standard.Base.Any.Any",
|
||||
"isStatic": false,
|
||||
"documentation": " ALIAS group by, summarize\nGROUP Standard.Base.Calculations\nICON sigma\n\nAggregates the rows in a table using any `Group_By` entries in columns.\nThe columns argument specifies which additional aggregations to perform and to return.\n\nArguments:\n- columns: Vector of `Aggregate_Column` specifying the aggregated table.\n Expressions can be used within the aggregate column to perform more\n complicated calculations.\n- error_on_missing_columns: Specifies if a missing columns in aggregates\n should result in an error regardless of the `on_problems` settings.\n Defaults to `False`, meaning that problematic aggregate will not be\n included in the result and the problem reported according to the\n `on_problems` setting.\n- on_problems: Specifies how to handle problems if they occur, reporting\n them as warnings by default.\n\n! Error Conditions\n\n - If there are no columns in the output table, a `No_Output_Columns` is\n raised as an error regardless of the problem behavior, because it is\n not possible to create a table without any columns.\n - If a column index is out of range, a `Missing_Input_Columns` is\n reported according to the `on_problems` setting, unless\n `error_on_missing_columns` is set to `True`, in which case it is\n raised as an error. Problems resolving `Group_By` columns are\n reported as dataflow errors regardless of these settings, as a\n missing grouping will completely change semantics of the query.\n - If a column selector is given as a `Text` and it does not match any\n columns in the input table nor is it a valid expression, an\n `Invalid_Aggregate_Column` problem is raised according to the\n `on_problems` settings (unless `error_on_missing_columns` is set to\n `True` in which case it will always be an error). Problems resolving\n `Group_By` columns are reported as dataflow errors regardless of\n these settings, as a missing grouping will completely change\n semantics of the query.\n - If an aggregation fails, an `Invalid_Aggregation` dataflow error is\n raised.\n - Additionally, the following problems may be reported according to the\n `on_problems` setting:\n - If there are invalid column names in the output table,\n a `Invalid_Column_Names`.\n - If there are duplicate column names in the output table,\n a `Duplicate_Output_Column_Names`.\n - If grouping on or computing the `Mode` on a floating point number,\n a `Floating_Point_Equality`.\n - If when concatenating values there is an quoted delimited,\n an `Unquoted_Delimiter`\n - If there are more than 10 issues with a single column,\n an `Additional_Warnings`.\n\n> Example\n Group by the Key column, count the rows\n\n table.aggregate [Aggregate_Column.Group_By \"Key\", Aggregate_Column.Count]",
|
||||
@ -1100,13 +1100,13 @@
|
||||
},
|
||||
{
|
||||
"type": "module",
|
||||
"module": "Standard.Table.Data.Aggregate_Column",
|
||||
"module": "Standard.Table.Aggregate_Column",
|
||||
"documentation": null,
|
||||
"reexport": "Standard.Table.Data"
|
||||
"reexport": "Standard.Table"
|
||||
},
|
||||
{
|
||||
"type": "type",
|
||||
"module": "Standard.Table.Data.Aggregate_Column",
|
||||
"module": "Standard.Table.Aggregate_Column",
|
||||
"name": "Aggregate_Column",
|
||||
"params": [],
|
||||
"parentType": "Standard.Base.Any.Any",
|
||||
@ -1115,7 +1115,7 @@
|
||||
},
|
||||
{
|
||||
"type": "constructor",
|
||||
"module": "Standard.Table.Data.Aggregate_Column",
|
||||
"module": "Standard.Table.Aggregate_Column",
|
||||
"name": "Group_By",
|
||||
"arguments": [
|
||||
{
|
||||
@ -1135,13 +1135,13 @@
|
||||
"tagValues": null
|
||||
}
|
||||
],
|
||||
"returnType": "Standard.Table.Data.Aggregate_Column.Aggregate_Column",
|
||||
"returnType": "Standard.Table.Aggregate_Column.Aggregate_Column",
|
||||
"documentation": " Specifies a column to group the rows by.\n\nArguments:\n- column: the column (specified by name, expression or index) to group\n by.\n- new_name: name of new column.",
|
||||
"annotations": []
|
||||
},
|
||||
{
|
||||
"type": "constructor",
|
||||
"module": "Standard.Table.Data.Aggregate_Column",
|
||||
"module": "Standard.Table.Aggregate_Column",
|
||||
"name": "Count",
|
||||
"arguments": [
|
||||
{
|
||||
@ -1153,13 +1153,13 @@
|
||||
"tagValues": null
|
||||
}
|
||||
],
|
||||
"returnType": "Standard.Table.Data.Aggregate_Column.Aggregate_Column",
|
||||
"returnType": "Standard.Table.Aggregate_Column.Aggregate_Column",
|
||||
"documentation": " Creates a new column with the row count of each group. If no rows,\nevaluates to 0.\n\nArguments:\n- new_name: name of new column.",
|
||||
"annotations": []
|
||||
},
|
||||
{
|
||||
"type": "constructor",
|
||||
"module": "Standard.Table.Data.Aggregate_Column",
|
||||
"module": "Standard.Table.Aggregate_Column",
|
||||
"name": "Count_Distinct",
|
||||
"arguments": [
|
||||
{
|
||||
@ -1190,18 +1190,18 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"returnType": "Standard.Table.Data.Aggregate_Column.Aggregate_Column",
|
||||
"returnType": "Standard.Table.Aggregate_Column.Aggregate_Column",
|
||||
"documentation": " Creates a new column with the count of unique items in the selected\ncolumn(s) within each group. If no rows, evaluates to 0.\n\nArguments:\n- columns: either a single or set of columns (specified by name or\n index) to count across. The aggregation may also be computed over\n an expression evaluated on the Table, if provided instead of a\n single column name. Currently expressions are not supported with\n multiple selection.\n- new_name: name of new column.\n- ignore_nothing: if all values are Nothing won't be included.",
|
||||
"annotations": []
|
||||
},
|
||||
{
|
||||
"type": "method",
|
||||
"module": "Standard.Table.Data.Table",
|
||||
"module": "Standard.Table.Table",
|
||||
"name": "select_columns",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "self",
|
||||
"reprType": "Standard.Table.Data.Table.Table",
|
||||
"reprType": "Standard.Table.Table.Table",
|
||||
"isSuspended": false,
|
||||
"hasDefault": false,
|
||||
"defaultValue": null,
|
||||
@ -1216,7 +1216,7 @@
|
||||
"tagValues": []
|
||||
}
|
||||
],
|
||||
"selfType": "Standard.Table.Data.Table.Table",
|
||||
"selfType": "Standard.Table.Table.Table",
|
||||
"returnType": "Standard.Base.Any.Any",
|
||||
"isStatic": false,
|
||||
"documentation": "",
|
||||
|
@ -431,5 +431,5 @@ get_download_url_for_file file:Enso_File -> Text =
|
||||
presigned_url
|
||||
|
||||
## PRIVATE
|
||||
asset_uri : Text
|
||||
asset_uri : Enso_File -> Text
|
||||
asset_uri file:Enso_File = Utils.assets_api + "/" + file.id
|
||||
|
@ -1,6 +1,6 @@
|
||||
from Standard.Base import all
|
||||
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
from Standard.Table import Value_Type
|
||||
|
||||
import project.Column_Constraint.Column_Constraint
|
||||
|
||||
|
@ -9,9 +9,8 @@ import Standard.Base.Runtime.Ref.Ref
|
||||
from Standard.Base.Metadata.Choice import Option
|
||||
from Standard.Base.Metadata.Widget import Single_Choice, Vector_Editor
|
||||
|
||||
import Standard.Table.Data.Table.Table
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
import Standard.Table.Internal.Column_Naming_Helper.Column_Naming_Helper
|
||||
from Standard.Table import Table, Value_Type
|
||||
|
||||
import project.Column_Description.Column_Description
|
||||
import project.DB_Table as DB_Table_Module
|
||||
|
@ -5,18 +5,14 @@ import Standard.Base.Errors.Illegal_State.Illegal_State
|
||||
import Standard.Base.Internal.Rounding_Helpers
|
||||
from Standard.Base.Widget_Helpers import make_format_chooser, make_regex_text_widget
|
||||
|
||||
import Standard.Table.Data.Column.Column
|
||||
import Standard.Table.Data.Constants.Previous_Value
|
||||
import Standard.Table.Data.Table.Table
|
||||
import Standard.Table.Data.Type.Enso_Types
|
||||
import Standard.Table.Data.Type.Value_Type_Helpers
|
||||
import Standard.Table.Internal.Column_Naming_Helper.Column_Naming_Helper
|
||||
import Standard.Table.Internal.Date_Time_Helpers
|
||||
import Standard.Table.Internal.Java_Problems
|
||||
import Standard.Table.Internal.Problem_Builder.Problem_Builder
|
||||
import Standard.Table.Internal.Value_Type_Helpers
|
||||
import Standard.Table.Internal.Widget_Helpers
|
||||
from Standard.Table import Auto, Data_Formatter, Sort_Column, Value_Type
|
||||
from Standard.Table.Data.Column import default_date_period
|
||||
from Standard.Table import Auto, Column, Data_Formatter, Previous_Value, Sort_Column, Table, Value_Type
|
||||
from Standard.Table.Column import default_date_period
|
||||
from Standard.Table.Errors import Conversion_Failure, Floating_Point_Equality, Inexact_Type_Coercion, Invalid_Value_Type
|
||||
from Standard.Table.Internal.Cast_Helpers import check_cast_compatibility
|
||||
|
||||
@ -1187,7 +1183,7 @@ type DB_Column
|
||||
sort self order=Sort_Direction.Ascending =
|
||||
self.to_table.order_by [Sort_Column.Index 0 order] . at 0
|
||||
|
||||
## ALIAS first, last, sample, slice, top, head, tail, limit
|
||||
## ALIAS first, head, last, limit, sample, slice, tail, top
|
||||
GROUP Standard.Base.Selections
|
||||
ICON select_row
|
||||
Creates a new Column with the specified range of rows from the input
|
||||
|
@ -16,37 +16,29 @@ from Standard.Base.Metadata import Display, make_single_choice, Widget
|
||||
from Standard.Base.Runtime import assert
|
||||
from Standard.Base.Widget_Helpers import make_delimiter_selector, make_format_chooser
|
||||
|
||||
import Standard.Table.Data.Blank_Selector.Blank_Selector
|
||||
import Standard.Table.Data.Calculations.Column_Operation.Column_Operation
|
||||
import Standard.Table.Data.Column_Ref.Column_Ref
|
||||
import Standard.Table.Data.Constants.Previous_Value
|
||||
import Standard.Table.Data.Expression.Expression
|
||||
import Standard.Table.Data.Expression.Expression_Error
|
||||
import Standard.Table.Data.Join_Condition.Join_Condition
|
||||
import Standard.Table.Data.Join_Kind.Join_Kind
|
||||
import Standard.Table.Data.Join_Kind_Cross.Join_Kind_Cross
|
||||
import Standard.Table.Data.Match_Columns as Match_Columns_Helpers
|
||||
import Standard.Table.Data.Report_Unmatched.Report_Unmatched
|
||||
import Standard.Table.Data.Row.Row
|
||||
import Standard.Table.Data.Simple_Expression.Simple_Expression
|
||||
import Standard.Table.Data.Table.Table
|
||||
import Standard.Table.Data.Type.Value_Type_Helpers
|
||||
import Standard.Table.Extensions.Table_Ref.Table_Ref
|
||||
import Standard.Table.Column_Operation.Column_Operation
|
||||
import Standard.Table.Expression.Expression
|
||||
import Standard.Table.Expression.Expression_Error
|
||||
import Standard.Table.Internal.Add_Row_Number
|
||||
import Standard.Table.Internal.Aggregate_Column_Helper
|
||||
import Standard.Table.Internal.Column_Naming_Helper.Column_Naming_Helper
|
||||
import Standard.Table.Internal.Constant_Column.Constant_Column
|
||||
import Standard.Table.Internal.Join_Kind_Cross.Join_Kind_Cross
|
||||
import Standard.Table.Internal.Problem_Builder.Problem_Builder
|
||||
import Standard.Table.Internal.Replace_Helpers
|
||||
import Standard.Table.Internal.Table_Helpers
|
||||
import Standard.Table.Internal.Table_Helpers.Table_Column_Helper
|
||||
import Standard.Table.Internal.Table_Ref.Table_Ref
|
||||
import Standard.Table.Internal.Unique_Name_Strategy.Unique_Name_Strategy
|
||||
import Standard.Table.Internal.Value_Type_Helpers
|
||||
import Standard.Table.Internal.Widget_Helpers
|
||||
from Standard.Table import Aggregate_Column, Auto, Data_Formatter, Match_Columns, Position, Set_Mode, Sort_Column, Value_Type
|
||||
from Standard.Table.Data.Column import get_item_string, normalize_string_for_display
|
||||
from Standard.Table.Data.Table import print_table
|
||||
import Standard.Table.Match_Columns as Match_Columns_Helpers
|
||||
import Standard.Table.Row.Row
|
||||
from Standard.Table import Aggregate_Column, Auto, Blank_Selector, Column_Ref, Data_Formatter, Join_Condition, Join_Kind, Match_Columns, Position, Previous_Value, Report_Unmatched, Set_Mode, Simple_Expression, Sort_Column, Table, Value_Type
|
||||
from Standard.Table.Column import get_item_string, normalize_string_for_display
|
||||
from Standard.Table.Errors import all
|
||||
from Standard.Table.Internal.Filter_Condition_Helpers import make_filter_column
|
||||
from Standard.Table.Table import print_table
|
||||
|
||||
import project.Connection.Connection.Connection
|
||||
import project.DB_Column.DB_Column
|
||||
@ -1387,7 +1379,7 @@ type DB_Table
|
||||
join_or_cross_join : DB_Table -> Join_Kind | Join_Kind_Cross -> Vector (Join_Condition | Text) | Text -> Text -> Problem_Behavior -> DB_Table
|
||||
join_or_cross_join self right:DB_Table join_kind on right_prefix on_problems =
|
||||
can_proceed = Helpers.ensure_same_connection "table" [self, right] <|
|
||||
join_conditions_ok = join_kind != Join_Kind_Cross.Cross || on == []
|
||||
join_conditions_ok = join_kind != Join_Kind_Cross || on == []
|
||||
if join_conditions_ok . not then Error.throw (Illegal_Argument.Error "Cross join does not allow join conditions") else
|
||||
True
|
||||
can_proceed.if_not_error <|
|
||||
@ -1432,7 +1424,7 @@ type DB_Table
|
||||
Join_Kind.Full -> SQL_Join_Kind.Full
|
||||
Join_Kind.Left_Exclusive -> SQL_Join_Kind.Left
|
||||
Join_Kind.Right_Exclusive -> SQL_Join_Kind.Right
|
||||
Join_Kind_Cross.Cross -> SQL_Join_Kind.Cross
|
||||
Join_Kind_Cross -> SQL_Join_Kind.Cross
|
||||
|
||||
problem_builder.attach_problems_before on_problems <|
|
||||
new_from = From_Spec.Join sql_join_kind left_setup.subquery right_setup.subquery on_expressions
|
||||
@ -1490,7 +1482,7 @@ type DB_Table
|
||||
[Cross_Join_Row_Limit_Exceeded.Error right_row_limit right.row_count]
|
||||
False -> []
|
||||
on_problems.attach_problems_before limit_problems <|
|
||||
self.join_or_cross_join right join_kind=Join_Kind_Cross.Cross on=[] right_prefix on_problems
|
||||
self.join_or_cross_join right join_kind=Join_Kind_Cross on=[] right_prefix on_problems
|
||||
|
||||
## ALIAS lookup
|
||||
GROUP Standard.Base.Calculations
|
||||
@ -1972,7 +1964,7 @@ type DB_Table
|
||||
if new_columns.is_empty then handle_no_output_columns else
|
||||
result = self.updated_context_and_columns new_ctx new_columns subquery=True
|
||||
if validated.old_style.not then result else
|
||||
Warning.attach (Deprecated.Warning "Standard.Table.Data.Aggregate_Column.Aggregate_Column" "Group_By" "Deprecated: `Group_By` constructor has been deprecated, use the `group_by` argument instead.") result
|
||||
Warning.attach (Deprecated.Warning "Standard.Table.Aggregate_Column.Aggregate_Column" "Group_By" "Deprecated: `Group_By` constructor has been deprecated, use the `group_by` argument instead.") result
|
||||
|
||||
## GROUP Standard.Base.Calculations
|
||||
ICON dataframe_map_row
|
||||
@ -2964,7 +2956,7 @@ display_dataframe df indices_count all_rows_count format_terminal =
|
||||
case there are no join conditions.
|
||||
default_join_condition : DB_Table -> Join_Kind | Join_Kind_Cross -> Join_Condition
|
||||
default_join_condition table join_kind = case join_kind of
|
||||
Join_Kind_Cross.Cross -> []
|
||||
Join_Kind_Cross -> []
|
||||
_ -> [Join_Condition.Equals table.column_names.first]
|
||||
|
||||
## PRIVATE
|
||||
|
@ -1,8 +1,8 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import Standard.Table.Data.Table.Table
|
||||
import Standard.Table.Internal.Widget_Helpers
|
||||
from Standard.Table import Table
|
||||
from Standard.Table.Errors import all
|
||||
|
||||
import project.Connection.Connection.Connection
|
||||
|
@ -1,8 +1,8 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import Standard.Table.Data.Table.Table
|
||||
import Standard.Table.Internal.Widget_Helpers
|
||||
from Standard.Table import Table
|
||||
from Standard.Table.Errors import all
|
||||
|
||||
import project.Connection.Connection.Connection
|
||||
|
@ -1,9 +1,9 @@
|
||||
from Standard.Base import all hiding First, Last
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import Standard.Table.Data.Aggregate_Column.Aggregate_Column
|
||||
import Standard.Table.Internal.Problem_Builder.Problem_Builder
|
||||
from Standard.Table.Data.Aggregate_Column.Aggregate_Column import all
|
||||
from Standard.Table import Aggregate_Column
|
||||
from Standard.Table.Aggregate_Column.Aggregate_Column import all
|
||||
from Standard.Table.Errors import Floating_Point_Equality
|
||||
|
||||
import project.DB_Table.DB_Table
|
||||
|
@ -1,15 +1,12 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import Standard.Table.Data.Column.Column
|
||||
import Standard.Table.Data.Type.Value_Type.Bits
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
import Standard.Table.Internal.Java_Exports
|
||||
from Standard.Table import Bits, Column, Value_Type
|
||||
|
||||
from project.Errors import Unsupported_Database_Operation
|
||||
|
||||
polyglot java import java.sql.ResultSet
|
||||
|
||||
polyglot java import org.enso.database.JDBCUtils
|
||||
polyglot java import org.enso.table.problems.ProblemAggregator
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.Illegal_State.Illegal_State
|
||||
|
||||
import Standard.Table.Data.Join_Kind.Join_Kind
|
||||
import Standard.Table.Internal.Join_Helpers
|
||||
import Standard.Table.Internal.Unique_Name_Strategy.Unique_Name_Strategy
|
||||
from Standard.Table import Join_Kind
|
||||
from Standard.Table.Errors import Floating_Point_Equality
|
||||
|
||||
import project.Connection.Connection.Connection
|
||||
|
@ -1,6 +1,6 @@
|
||||
from Standard.Base import all
|
||||
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
from Standard.Table import Value_Type
|
||||
|
||||
## PRIVATE
|
||||
type Row_Number_Metadata
|
||||
|
@ -6,8 +6,7 @@ import Standard.Base.Runtime.Context
|
||||
import Standard.Base.Runtime.Managed_Resource.Managed_Resource
|
||||
from Standard.Base.Enso_Cloud.Enso_Secret import as_hideable_value
|
||||
|
||||
import Standard.Table.Data.Table.Table
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
from Standard.Table import Table, Value_Type
|
||||
|
||||
import project.Internal.Column_Fetcher as Column_Fetcher_Module
|
||||
import project.Internal.In_Transaction.In_Transaction
|
||||
|
@ -6,8 +6,7 @@ import Standard.Base.Metadata.Display
|
||||
from Standard.Base.Metadata.Choice import Option
|
||||
from Standard.Base.Metadata.Widget import Single_Choice
|
||||
|
||||
import Standard.Table.Data.Table.Table
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
from Standard.Table import Table, Value_Type
|
||||
|
||||
import project.Column_Description.Column_Description
|
||||
import project.Connection.Connection.Connection
|
||||
|
@ -3,12 +3,10 @@ import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
import Standard.Base.Errors.Illegal_State.Illegal_State
|
||||
import Standard.Base.Errors.Unimplemented.Unimplemented
|
||||
|
||||
import Standard.Table.Data.Aggregate_Column.Aggregate_Column
|
||||
import Standard.Table.Data.Column.Column
|
||||
import Standard.Table.Internal.Problem_Builder.Problem_Builder
|
||||
import Standard.Table.Internal.Vector_Builder.Vector_Builder
|
||||
from Standard.Table import Value_Type
|
||||
from Standard.Table.Data.Aggregate_Column.Aggregate_Column import all
|
||||
from Standard.Table import Aggregate_Column, Column, Value_Type
|
||||
from Standard.Table.Aggregate_Column.Aggregate_Column import all
|
||||
from Standard.Table.Errors import Inexact_Type_Coercion
|
||||
|
||||
import project.Connection.Connection.Connection
|
||||
|
@ -1,8 +1,7 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import Standard.Table.Data.Type.Value_Type.Bits
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
from Standard.Table import Bits, Value_Type
|
||||
from Standard.Table.Errors import Inexact_Type_Coercion
|
||||
|
||||
import project.Internal.Column_Fetcher as Column_Fetcher_Module
|
||||
|
@ -1,7 +1,7 @@
|
||||
from Standard.Base import all
|
||||
|
||||
import Standard.Table.Data.Table.Table
|
||||
import Standard.Table.Internal.Java_Problems
|
||||
from Standard.Table import Table
|
||||
|
||||
import project.Internal.Column_Fetcher.Column_Fetcher
|
||||
import project.SQL_Type.SQL_Type
|
||||
|
@ -2,7 +2,7 @@ from Standard.Base import all
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
import Standard.Base.Errors.Unimplemented.Unimplemented
|
||||
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
from Standard.Table import Value_Type
|
||||
from Standard.Table.Errors import Inexact_Type_Coercion
|
||||
|
||||
import project.Internal.IR.SQL_Expression.SQL_Expression
|
||||
|
@ -4,8 +4,7 @@ import Standard.Base.Metadata.Display
|
||||
from Standard.Base.Metadata.Choice import Option
|
||||
from Standard.Base.Metadata.Widget import Single_Choice
|
||||
|
||||
import Standard.Table.Data.Table.Table
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
from Standard.Table import Table, Value_Type
|
||||
|
||||
import project.Column_Description.Column_Description
|
||||
import project.Connection.Connection.Connection
|
||||
|
@ -5,7 +5,7 @@ import Standard.Base.Runtime.Ref.Ref
|
||||
|
||||
import Standard.Table.Internal.Problem_Builder.Problem_Builder
|
||||
from Standard.Table import Aggregate_Column, Value_Type
|
||||
from Standard.Table.Data.Aggregate_Column.Aggregate_Column import all
|
||||
from Standard.Table.Aggregate_Column.Aggregate_Column import all
|
||||
|
||||
import project.Connection.Connection.Connection
|
||||
import project.DB_Column.DB_Column
|
||||
|
@ -2,10 +2,8 @@ from Standard.Base import all
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
import Standard.Base.Errors.Illegal_State.Illegal_State
|
||||
|
||||
import Standard.Table.Data.Type.Enso_Types
|
||||
import Standard.Table.Data.Type.Value_Type.Bits
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
import Standard.Table.Data.Type.Value_Type_Helpers
|
||||
import Standard.Table.Internal.Value_Type_Helpers
|
||||
from Standard.Table import Bits, Value_Type
|
||||
from Standard.Table.Errors import Inexact_Type_Coercion
|
||||
|
||||
import project.DB_Column.DB_Column
|
||||
@ -155,7 +153,7 @@ operations_map =
|
||||
column : DB_Column -> column.value_type
|
||||
internal_column : Internal_Column ->
|
||||
SQLite_Type_Mapping.sql_type_to_value_type internal_column.sql_type_reference.get
|
||||
enso_value -> Enso_Types.most_specific_value_type enso_value use_smallest=True
|
||||
enso_value -> Value_Type_Helpers.most_specific_value_type enso_value use_smallest=True
|
||||
|
||||
## We actually re-use the logic from the in-memory backend, since the
|
||||
SQLite types essentially implement a very simple subset of our types.
|
||||
|
@ -1,7 +1,7 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.Illegal_State.Illegal_State
|
||||
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
from Standard.Table import Value_Type
|
||||
|
||||
polyglot java import java.math.BigDecimal as Java_Big_Decimal
|
||||
polyglot java import java.sql.PreparedStatement
|
||||
|
@ -6,9 +6,8 @@ import Standard.Base.Errors.Illegal_State.Illegal_State
|
||||
import Standard.Base.Runtime.Context
|
||||
from Standard.Base.Runtime import assert
|
||||
|
||||
import Standard.Table.Data.Table.Table
|
||||
import Standard.Table.Internal.Problem_Builder.Problem_Builder
|
||||
from Standard.Table import Aggregate_Column, Join_Kind, Value_Type
|
||||
from Standard.Table import Aggregate_Column, Join_Kind, Table, Value_Type
|
||||
from Standard.Table.Errors import all
|
||||
|
||||
import project.Column_Constraint.Column_Constraint
|
||||
|
@ -5,7 +5,7 @@ import Standard.Base.Metadata.Display
|
||||
from Standard.Base.Metadata.Choice import Option
|
||||
from Standard.Base.Metadata.Widget import Single_Choice
|
||||
|
||||
import Standard.Table.Data.Table.Table
|
||||
from Standard.Table import Table
|
||||
|
||||
import Standard.Database.Column_Description.Column_Description
|
||||
import Standard.Database.Connection.Connection.Connection
|
||||
|
@ -3,9 +3,8 @@ private
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import Standard.Table.Data.Type.Value_Type.Bits
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
import Standard.Table.Internal.Java_Exports
|
||||
from Standard.Table import Bits, Value_Type
|
||||
from Standard.Table.Errors import Inexact_Type_Coercion
|
||||
|
||||
import Standard.Database.Internal.Column_Fetcher as Column_Fetcher_Module
|
||||
|
@ -1,6 +1,6 @@
|
||||
from Standard.Base import all
|
||||
|
||||
import project.Data.Sort_Column.Sort_Column
|
||||
import project.Sort_Column.Sort_Column
|
||||
|
||||
## Defines an Aggregate Column
|
||||
type Aggregate_Column
|
@ -13,24 +13,24 @@ import Standard.Base.Internal.Rounding_Helpers
|
||||
from Standard.Base.Metadata.Widget import Numeric_Input
|
||||
from Standard.Base.Widget_Helpers import make_format_chooser, make_regex_text_widget
|
||||
|
||||
import project.Data.Constants.Previous_Value
|
||||
import project.Data.Data_Formatter.Data_Formatter
|
||||
import project.Data.Table.Table
|
||||
import project.Data.Type.Enso_Types
|
||||
import project.Data.Type.Storage
|
||||
import project.Data.Type.Value_Type_Helpers
|
||||
import project.Constants.Previous_Value
|
||||
import project.Data_Formatter.Data_Formatter
|
||||
import project.Internal.Cast_Helpers
|
||||
import project.Internal.Column_Naming_Helper.Column_Naming_Helper
|
||||
import project.Internal.Column_Ops
|
||||
import project.Internal.Date_Time_Helpers
|
||||
import project.Internal.Java_Problems
|
||||
import project.Internal.Parse_Values_Helper
|
||||
import project.Internal.Storage
|
||||
import project.Internal.Value_Type_Helpers
|
||||
import project.Internal.Widget_Helpers
|
||||
from project.Data.Table import print_table
|
||||
from project.Data.Type.Value_Type import Auto, Value_Type
|
||||
import project.Table.Table
|
||||
import project.Value_Type.Auto
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Errors import Conversion_Failure, Floating_Point_Equality, Inexact_Type_Coercion, Invalid_Column_Names, Invalid_Value_Type, No_Index_Set_Error
|
||||
from project.Internal.Column_Format import all
|
||||
from project.Internal.Java_Exports import make_date_builder_adapter, make_string_builder
|
||||
from project.Table import print_table
|
||||
|
||||
polyglot java import org.enso.base.Time_Utils
|
||||
polyglot java import org.enso.table.data.column.operation.cast.CastProblemAggregator
|
||||
@ -94,7 +94,7 @@ type Column
|
||||
_ -> Storage.from_value_type value_type on_problems=Problem_Behavior.Report_Warning
|
||||
raise_invalid_value_type_error problematic_value =
|
||||
expected_type = value_type
|
||||
actual_type = Enso_Types.most_specific_value_type problematic_value use_smallest=True
|
||||
actual_type = Value_Type_Helpers.most_specific_value_type problematic_value use_smallest=True
|
||||
Error.throw (Invalid_Value_Type.Value expected_type actual_type problematic_value)
|
||||
handle_invalid_value_type ~action = Panic.catch ValueTypeMismatchException action caught_panic->
|
||||
java_exception = caught_panic.payload
|
@ -1,10 +1,10 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.Deprecated.Deprecated
|
||||
|
||||
import project.Data.Column_Ref.Column_Ref
|
||||
import project.Data.Expression.Expression
|
||||
import project.Data.Simple_Expression.Simple_Calculation
|
||||
import project.Data.Simple_Expression.Simple_Expression
|
||||
import project.Column_Ref.Column_Ref
|
||||
import project.Expression.Expression
|
||||
import project.Simple_Expression.Simple_Calculation
|
||||
import project.Simple_Expression.Simple_Expression
|
||||
|
||||
## PRIVATE
|
||||
|
||||
@ -99,4 +99,4 @@ Simple_Expression.from (that:Column_Operation) =
|
||||
Column_Operation.Or input rhs -> Simple_Expression.From input (Simple_Calculation.Or rhs)
|
||||
Column_Operation.If input condition true_value false_value -> Simple_Expression.From input (Simple_Calculation.If condition true_value false_value)
|
||||
Column_Operation.Trim input where what -> Simple_Expression.From input (Simple_Calculation.Trim where what)
|
||||
Warning.attach (Deprecated.Warning "Standard.Table.Data.Column_Operation.Column_Operation" "" "Deprecated: `Column_Operation` has been replaced by `Simple_Expression`.") derived
|
||||
Warning.attach (Deprecated.Warning "Standard.Table.Column_Operation.Column_Operation" "" "Deprecated: `Column_Operation` has been replaced by `Simple_Expression`.") derived
|
@ -2,3 +2,7 @@
|
||||
when filling in missing values, for example in `fill_nothing` and
|
||||
`fill_empty`.
|
||||
type Previous_Value
|
||||
|
||||
## A value that marks the mode that allows column mismatches but reports them as
|
||||
a problem.
|
||||
type Report_Unmatched
|
@ -2,9 +2,9 @@ from Standard.Base import all
|
||||
import Standard.Base.Data.Java_Json.Jackson_Object
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
from Standard.Table import Column, Table
|
||||
|
||||
import project.Data.Row.Row
|
||||
import project.Column.Column
|
||||
import project.Row.Row
|
||||
import project.Table.Table
|
||||
|
||||
## PRIVATE
|
||||
A special type describing how to convert an object into a set of table
|
@ -1,9 +1,9 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Data.Java_Json.Jackson_Object
|
||||
|
||||
from Standard.Table import Column, Table
|
||||
|
||||
import project.Data.Conversions.Convertible_To_Columns.Convertible_To_Columns
|
||||
import project.Column.Column
|
||||
import project.Conversions.Convertible_To_Columns.Convertible_To_Columns
|
||||
import project.Table.Table
|
||||
|
||||
## PRIVATE
|
||||
A special type that is used to define what types can be converted to a table
|
@ -1,3 +0,0 @@
|
||||
## A value that marks the mode that allows column mismatches but reports them as
|
||||
a problem.
|
||||
type Report_Unmatched
|
@ -1,48 +0,0 @@
|
||||
from Standard.Base import all
|
||||
|
||||
import project.Data.Type.Storage
|
||||
import project.Data.Type.Value_Type.Bits
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
|
||||
polyglot java import org.enso.base.polyglot.NumericConverter
|
||||
polyglot java import org.enso.table.data.column.storage.type.IntegerType
|
||||
|
||||
## PRIVATE
|
||||
Finds the most specific `Value_Type` that can be used to hold the given
|
||||
value.
|
||||
|
||||
This method will still prefer default types used in the in-memory backend, so
|
||||
for integers it will return 64-bit integers even if the value could fit in a
|
||||
smaller one; and for Text values variable-length text will be preferred over
|
||||
fixed-length.
|
||||
most_specific_value_type : Any -> Boolean -> Value_Type
|
||||
most_specific_value_type value use_smallest=False =
|
||||
case value of
|
||||
_ : Float -> Value_Type.Float Bits.Bits_64
|
||||
_ : Boolean -> Value_Type.Boolean
|
||||
_ : Date -> Value_Type.Date
|
||||
_ : Time_Of_Day -> Value_Type.Time
|
||||
_ : Date_Time -> Value_Type.Date_Time
|
||||
i : Integer ->
|
||||
case NumericConverter.isBigInteger i of
|
||||
False -> case use_smallest of
|
||||
False -> Value_Type.Integer Bits.Bits_64
|
||||
True ->
|
||||
storage_type = IntegerType.smallestFitting i
|
||||
value_type = Storage.to_value_type storage_type
|
||||
# We do a small rewrite here - for integers we always return the Integer type, even if the value is small enough to fit in a Byte.
|
||||
if value_type == Value_Type.Byte then Value_Type.Integer Bits.Bits_16 else value_type
|
||||
True -> Value_Type.Decimal precision=Nothing scale=0
|
||||
text : Text ->
|
||||
length = text.length
|
||||
case use_smallest of
|
||||
False -> Value_Type.Char size=Nothing variable_length=True
|
||||
True ->
|
||||
case length > 0 of
|
||||
True -> Value_Type.Char size=length variable_length=False
|
||||
# Not using Char size=0 for empty strings, because that would be an invalid value.
|
||||
False -> Value_Type.Char size=1 variable_length=True
|
||||
|
||||
## TODO [RW] once we add Enso Native Object Type Value Type, we probably
|
||||
want to prefer it over Mixed
|
||||
_ -> Value_Type.Mixed
|
@ -5,11 +5,13 @@ import Standard.Base.Metadata.Display
|
||||
from Standard.Base.Metadata.Widget import Vector_Editor
|
||||
from Standard.Base.Widget_Helpers import make_date_format_selector, make_date_time_format_selector, make_time_format_selector
|
||||
|
||||
import project.Data.Type.Storage
|
||||
import project.Internal.Java_Problems
|
||||
import project.Internal.Parse_Values_Helper
|
||||
import project.Internal.Storage
|
||||
import project.Internal.Widget_Helpers
|
||||
from project.Data.Type.Value_Type import Auto, Bits, Value_Type
|
||||
import project.Value_Type.Auto
|
||||
import project.Value_Type.Bits
|
||||
import project.Value_Type.Value_Type
|
||||
|
||||
polyglot java import java.lang.Exception as Java_Exception
|
||||
polyglot java import java.lang.IllegalArgumentException
|
@ -8,12 +8,12 @@ from Standard.Base.Metadata.Choice import Option
|
||||
from Standard.Base.System.File_Format import parse_boolean_with_infer
|
||||
from Standard.Base.Widget_Helpers import make_file_read_delimiter_selector
|
||||
|
||||
import project.Data.Data_Formatter.Data_Formatter
|
||||
import project.Data.Match_Columns.Match_Columns
|
||||
import project.Data.Table.Table
|
||||
import project.Data_Formatter.Data_Formatter
|
||||
import project.Delimited.Quote_Style.Quote_Style
|
||||
import project.Internal.Delimited_Reader
|
||||
import project.Internal.Delimited_Writer
|
||||
import project.Match_Columns.Match_Columns
|
||||
import project.Table.Table
|
||||
|
||||
## Read delimited files such as CSVs into a Table.
|
||||
type Delimited_Format
|
||||
|
@ -1,8 +1,8 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.No_Such_Key.No_Such_Key
|
||||
|
||||
import Standard.Table.Data.Expression.Expression_Error
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
import project.Expression.Expression_Error
|
||||
import project.Value_Type.Value_Type
|
||||
|
||||
polyglot java import org.enso.table.error.ColumnCountMismatchException
|
||||
polyglot java import org.enso.table.error.ColumnNameMismatchException
|
||||
@ -10,7 +10,6 @@ polyglot java import org.enso.table.error.EmptyFileException
|
||||
polyglot java import org.enso.table.error.EmptySheetException
|
||||
polyglot java import org.enso.table.error.InvalidColumnNameException
|
||||
|
||||
|
||||
type Missing_Input_Columns
|
||||
## PRIVATE
|
||||
One or more columns not found in the input table.
|
||||
|
@ -8,13 +8,13 @@ from Standard.Base.Metadata.Choice import Option
|
||||
from Standard.Base.Metadata.Widget import Numeric_Input, Text_Input
|
||||
from Standard.Base.System.File_Format import parse_boolean_with_infer
|
||||
|
||||
import project.Data.Match_Columns.Match_Columns
|
||||
import project.Data.Table.Table
|
||||
import project.Excel.Excel_Range.Excel_Range
|
||||
import project.Excel.Excel_Workbook.Excel_Workbook
|
||||
import project.Internal.Excel_Reader
|
||||
import project.Internal.Excel_Section.Excel_Section
|
||||
import project.Internal.Excel_Writer
|
||||
import project.Match_Columns.Match_Columns
|
||||
import project.Table.Table
|
||||
|
||||
## PRIVATE
|
||||
Resolve the xls_format setting to a boolean.
|
||||
|
@ -11,11 +11,11 @@ from Standard.Base.Data.Filter_Condition import sql_like_to_regex
|
||||
from Standard.Base.Metadata.Choice import Option
|
||||
from Standard.Base.Metadata.Widget import Single_Choice
|
||||
|
||||
import project.Data.Table.Table
|
||||
import project.Excel.Excel_Range.Excel_Range
|
||||
import project.Internal.Excel_Reader
|
||||
import project.Internal.Excel_Section.Excel_Section
|
||||
import project.Internal.Java_Problems
|
||||
import project.Table.Table
|
||||
|
||||
polyglot java import java.io.File as Java_File
|
||||
polyglot java import org.apache.poi.ss.usermodel.Workbook
|
||||
|
@ -1,7 +1,7 @@
|
||||
from Standard.Base import all
|
||||
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Table.Table
|
||||
import project.Column.Column
|
||||
import project.Table.Table
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
@ -6,12 +6,12 @@ import Standard.Base.Errors.Unimplemented.Unimplemented
|
||||
import Standard.Base.System.File.Generic.Writable_File.Writable_File
|
||||
from Standard.Base.Metadata import make_single_choice
|
||||
|
||||
import project.Data.Match_Columns.Match_Columns
|
||||
import project.Data.Table.Table
|
||||
import project.Errors.Invalid_JSON_Format
|
||||
import project.Internal.Expand_Objects_Helpers
|
||||
import project.Internal.Parse_To_Table
|
||||
import project.Internal.Widget_Helpers
|
||||
import project.Match_Columns.Match_Columns
|
||||
import project.Table.Table
|
||||
|
||||
## GROUP Standard.Base.Conversions
|
||||
ICON convert
|
||||
|
@ -2,13 +2,13 @@ from Standard.Base import all
|
||||
import Standard.Base.Errors.Common.Unsupported_Argument_Types
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Set_Mode.Set_Mode
|
||||
import project.Data.Sort_Column.Sort_Column
|
||||
import project.Data.Table.Table
|
||||
import project.Column.Column
|
||||
import project.Internal.Java_Problems
|
||||
import project.Internal.Problem_Builder.Problem_Builder
|
||||
import project.Internal.Table_Helpers
|
||||
import project.Set_Mode.Set_Mode
|
||||
import project.Sort_Column.Sort_Column
|
||||
import project.Table.Table
|
||||
from project.Errors import Duplicate_Output_Column_Names
|
||||
|
||||
polyglot java import java.lang.ArithmeticException
|
||||
|
@ -3,15 +3,15 @@ import Standard.Base.Data.Vector.No_Wrap
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
from Standard.Base.Runtime import assert
|
||||
|
||||
import project.Data.Aggregate_Column.Aggregate_Column
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Sort_Column.Sort_Column
|
||||
import project.Data.Table.Table
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Aggregate_Column.Aggregate_Column
|
||||
import project.Column.Column
|
||||
import project.Internal.Column_Naming_Helper.Column_Naming_Helper
|
||||
import project.Internal.Problem_Builder.Problem_Builder
|
||||
import project.Internal.Table_Helpers
|
||||
from project.Data.Aggregate_Column.Aggregate_Column import all
|
||||
import project.Sort_Column.Sort_Column
|
||||
import project.Table.Table
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Aggregate_Column.Aggregate_Column import all
|
||||
from project.Errors import Duplicate_Output_Column_Names, Invalid_Aggregation, Invalid_Column_Names, No_Output_Columns
|
||||
|
||||
polyglot java import org.enso.table.aggregations.Aggregator
|
||||
|
@ -1,10 +1,10 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import project.Data.Type.Storage
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Internal.Java_Problems
|
||||
import project.Internal.Parse_Values_Helper
|
||||
import project.Internal.Storage
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Errors import Conversion_Failure
|
||||
|
||||
polyglot java import org.enso.table.data.column.storage.type.StorageType
|
||||
|
@ -1,11 +1,11 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
import Standard.Base.Errors.Illegal_State.Illegal_State
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Data_Formatter.Data_Formatter
|
||||
import project.Data.Type.Storage
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
|
||||
import project.Column.Column
|
||||
import project.Data_Formatter.Data_Formatter
|
||||
import project.Internal.Storage
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Internal.Java_Exports import make_string_builder
|
||||
|
||||
polyglot java import java.lang.IllegalArgumentException
|
||||
|
@ -2,7 +2,7 @@ from Standard.Base import all
|
||||
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import project.Data.Column.Column
|
||||
import project.Column.Column
|
||||
import project.Internal.Problem_Builder.Problem_Builder
|
||||
|
||||
## PRIVATE
|
||||
|
@ -5,8 +5,8 @@ import Standard.Base.Metadata.Widget
|
||||
from Standard.Base.Metadata.Choice import Option
|
||||
from Standard.Base.Metadata.Widget import Single_Choice
|
||||
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Column.Column
|
||||
import project.Value_Type.Value_Type
|
||||
|
||||
## PRIVATE
|
||||
check_period_aligned_with_value_type value_type period ~action = case value_type of
|
||||
|
@ -4,11 +4,11 @@ import Standard.Base.Errors.File_Error.File_Error
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
import Standard.Base.System.Input_Stream.Input_Stream
|
||||
|
||||
import project.Data.Data_Formatter.Data_Formatter
|
||||
import project.Data.Table.Table
|
||||
import project.Data_Formatter.Data_Formatter
|
||||
import project.Delimited.Delimited_Format.Delimited_Format
|
||||
import project.Delimited.Quote_Style.Quote_Style
|
||||
import project.Internal.Java_Problems
|
||||
import project.Table.Table
|
||||
from project.Errors import Empty_File_Error, Mismatched_Quote, Parser_Error
|
||||
|
||||
polyglot java import com.univocity.parsers.common.TextParsingException
|
||||
|
@ -4,14 +4,14 @@ import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
import Standard.Base.System.File.Generic.Writable_File.Writable_File
|
||||
import Standard.Base.System.Output_Stream.Output_Stream
|
||||
|
||||
import project.Data.Data_Formatter.Data_Formatter
|
||||
import project.Data.Match_Columns.Match_Columns
|
||||
import project.Data.Table.Table
|
||||
import project.Data_Formatter.Data_Formatter
|
||||
import project.Delimited.Delimited_Format.Delimited_Format
|
||||
import project.Delimited.Quote_Style.Quote_Style
|
||||
import project.Internal.Delimited_Reader
|
||||
import project.Internal.Delimited_Reader.Detected_Headers
|
||||
import project.Internal.Java_Problems
|
||||
import project.Match_Columns.Match_Columns
|
||||
import project.Table.Table
|
||||
from project.Errors import Column_Count_Mismatch, Column_Name_Mismatch
|
||||
|
||||
polyglot java import java.io.IOException
|
||||
|
@ -3,10 +3,10 @@ import Standard.Base.Errors.File_Error.File_Error
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
import Standard.Base.System.Input_Stream.Input_Stream
|
||||
|
||||
import project.Data.Table.Table
|
||||
import project.Excel.Excel_Range.Excel_Range
|
||||
import project.Internal.Excel_Section.Excel_Section
|
||||
import project.Internal.Java_Problems
|
||||
import project.Table.Table
|
||||
from project.Errors import Duplicate_Output_Column_Names, Empty_Sheet_Error, Invalid_Column_Names, Invalid_Location
|
||||
|
||||
polyglot java import java.io.File as Java_File
|
||||
|
@ -7,11 +7,11 @@ import Standard.Base.Runtime.Managed_Resource.Managed_Resource
|
||||
import Standard.Base.System.File.Generic.Writable_File.Writable_File
|
||||
from Standard.Base.System.File import file_as_java
|
||||
|
||||
import project.Data.Match_Columns.Match_Columns
|
||||
import project.Data.Table.Table
|
||||
import project.Excel.Excel_Range.Excel_Range
|
||||
import project.Internal.Excel_Reader
|
||||
import project.Internal.Excel_Section.Excel_Section
|
||||
import project.Match_Columns.Match_Columns
|
||||
import project.Table.Table
|
||||
from project.Errors import Column_Count_Mismatch, Column_Name_Mismatch, Existing_Data, Invalid_Location, Range_Exceeded
|
||||
|
||||
polyglot java import java.io.File as Java_File
|
||||
|
@ -3,16 +3,16 @@ import Standard.Base.Errors.Common.Index_Out_Of_Bounds
|
||||
import Standard.Base.Errors.Common.Type_Error
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Conversions.Convertible_To_Columns.Convertible_To_Columns
|
||||
import project.Data.Conversions.Convertible_To_Rows.Convertible_To_Rows
|
||||
import project.Data.Table.Table
|
||||
import project.Column.Column
|
||||
import project.Conversions.Convertible_To_Columns.Convertible_To_Columns
|
||||
import project.Conversions.Convertible_To_Rows.Convertible_To_Rows
|
||||
import project.Errors.No_Such_Column
|
||||
import project.Extensions.Prefix_Name.Prefix_Name
|
||||
import project.Internal.Fan_Out
|
||||
import project.Internal.Java_Exports
|
||||
import project.Internal.Java_Problems
|
||||
import project.Internal.Widget_Helpers
|
||||
import project.Prefix_Name.Prefix_Name
|
||||
import project.Table.Table
|
||||
from project.Internal.Java_Exports import make_inferred_builder
|
||||
|
||||
## PRIVATE
|
||||
|
@ -1,12 +1,11 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Runtime.Ref.Ref
|
||||
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Conversions.Convertible_To_Rows.Key_Value
|
||||
import project.Data.Table.Table
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Column.Column
|
||||
import project.Conversions.Convertible_To_Rows.Key_Value
|
||||
import project.Internal.Problem_Builder.Problem_Builder
|
||||
|
||||
import project.Table.Table
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Errors import Column_Count_Exceeded, Column_Count_Mismatch
|
||||
from project.Internal.Java_Exports import make_string_builder
|
||||
|
||||
|
@ -2,7 +2,7 @@ from Standard.Base import all
|
||||
import Standard.Base.Errors.Common.No_Such_Method
|
||||
from Standard.Base.Data.Filter_Condition.Filter_Condition import all
|
||||
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Errors import Nothing_Value_In_Filter_Condition
|
||||
|
||||
## PRIVATE
|
||||
|
@ -1,9 +1,9 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Errors.Common.Missing_Required_Argument
|
||||
|
||||
import project.Data.Type.Storage
|
||||
import project.Data.Type.Value_Type.Bits
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Internal.Storage
|
||||
import project.Value_Type.Bits
|
||||
import project.Value_Type.Value_Type
|
||||
|
||||
polyglot java import org.enso.table.data.column.builder.BigIntegerBuilder
|
||||
polyglot java import org.enso.table.data.column.builder.BoolBuilder
|
||||
|
@ -4,7 +4,7 @@ import Standard.Base.Errors.Common.Additional_Warnings
|
||||
import Standard.Base.Errors.Common.Arithmetic_Error
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import project.Data.Type.Storage
|
||||
import project.Internal.Storage
|
||||
from project.Errors import all
|
||||
|
||||
polyglot java import org.enso.table.data.column.builder.LossOfIntegerPrecision
|
||||
|
@ -3,9 +3,9 @@ import Standard.Base.Data.Vector.No_Wrap
|
||||
import Standard.Base.Errors.Common.Index_Out_Of_Bounds
|
||||
import Standard.Base.Errors.Illegal_State.Illegal_State
|
||||
|
||||
import project.Data.Join_Condition.Join_Condition
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Internal.Problem_Builder.Problem_Builder
|
||||
import project.Join_Condition.Join_Condition
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Errors import Invalid_Value_Type, Missing_Input_Columns, No_Such_Column
|
||||
|
||||
type Join_Condition_Resolver
|
||||
|
@ -1,10 +1,8 @@
|
||||
from Standard.Base import all
|
||||
|
||||
## Cartesian product: each row of the left table is paired with each row of
|
||||
the right table.
|
||||
type Join_Kind_Cross
|
||||
## Cartesian product: each row of the left table is paired with each row of
|
||||
the right table.
|
||||
Cross
|
||||
|
||||
## PRIVATE
|
||||
Returns the SQL representation of this join kind as text.
|
||||
to_sql : Text
|
@ -2,9 +2,9 @@ from Standard.Base import all
|
||||
import Standard.Base.Data.Vector.No_Wrap
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import project.Data.Type.Storage
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Data.Type.Value_Type_Helpers
|
||||
import project.Internal.Storage
|
||||
import project.Internal.Value_Type_Helpers
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Errors import Floating_Point_Equality, Missing_Input_Columns, No_Common_Type, No_Output_Columns, Unexpected_Extra_Columns
|
||||
|
||||
polyglot java import org.enso.table.data.table.join.lookup.LookupColumnDescription
|
||||
|
@ -2,8 +2,8 @@ from Standard.Base import all
|
||||
import Standard.Base.Data.Array_Proxy.Array_Proxy
|
||||
import Standard.Base.Errors.Illegal_State.Illegal_State
|
||||
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Column.Column
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Errors import Floating_Point_Equality
|
||||
|
||||
## PRIVATE
|
||||
|
@ -3,11 +3,11 @@ import Standard.Base.Data.Text.Regex.Regex_Syntax_Error
|
||||
import Standard.Base.Errors.Common.Type_Error
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Data_Formatter.Data_Formatter
|
||||
import project.Data.Table.Table
|
||||
import project.Column.Column
|
||||
import project.Data_Formatter.Data_Formatter
|
||||
import project.Internal.Naming_Properties.Unlimited_Naming_Properties
|
||||
import project.Internal.Unique_Name_Strategy.Unique_Name_Strategy
|
||||
import project.Table.Table
|
||||
from project import Value_Type
|
||||
from project.Errors import Duplicate_Output_Column_Names
|
||||
|
||||
|
@ -2,8 +2,8 @@ from Standard.Base import all
|
||||
import Standard.Base.Errors.Empty_Error.Empty_Error
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import project.Data.Set_Mode.Set_Mode
|
||||
import project.Data.Table.Table
|
||||
import project.Set_Mode.Set_Mode
|
||||
import project.Table.Table
|
||||
from project.Errors import Missing_Input_Columns, No_Such_Column, Non_Unique_Key, Unmatched_Rows_In_Lookup
|
||||
|
||||
## PRIVATE
|
||||
|
@ -1,7 +1,7 @@
|
||||
from Standard.Base import all
|
||||
|
||||
import project.Data.Row.Row
|
||||
import project.Data.Table.Table
|
||||
import project.Row.Row
|
||||
import project.Table.Table
|
||||
|
||||
## PRIVATE
|
||||
type Rows_View
|
||||
|
@ -1,7 +1,7 @@
|
||||
from Standard.Base import all
|
||||
|
||||
import project.Data.Table.Table
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Table.Table
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Internal.Fan_Out import all
|
||||
|
||||
## PRIVATE
|
||||
|
@ -3,9 +3,9 @@ import Standard.Base.Errors.Common.Index_Out_Of_Bounds
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
import Standard.Base.Errors.Illegal_State.Illegal_State
|
||||
|
||||
import Standard.Table.Data.Type.Value_Type.Bits
|
||||
import Standard.Table.Data.Type.Value_Type.Value_Type
|
||||
from Standard.Table.Errors import Inexact_Type_Coercion
|
||||
import project.Value_Type.Bits
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Errors import Inexact_Type_Coercion
|
||||
|
||||
polyglot java import org.enso.table.data.column.builder.Builder as Java_Builder
|
||||
polyglot java import org.enso.table.data.column.storage.type.AnyObjectType
|
@ -3,18 +3,18 @@ import Standard.Base.Data.Vector.No_Wrap
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
import Standard.Base.Errors.Illegal_State.Illegal_State
|
||||
|
||||
import project.Data.Aggregate_Column.Aggregate_Column
|
||||
import project.Data.Blank_Selector.Blank_Selector
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Expression.Expression
|
||||
import project.Data.Position.Position
|
||||
import project.Data.Set_Mode.Set_Mode
|
||||
import project.Data.Sort_Column.Sort_Column
|
||||
import project.Data.Table.Table
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Data.Type.Value_Type_Helpers
|
||||
import project.Aggregate_Column.Aggregate_Column
|
||||
import project.Blank_Selector.Blank_Selector
|
||||
import project.Column.Column
|
||||
import project.Expression.Expression
|
||||
import project.Internal.Column_Naming_Helper.Column_Naming_Helper
|
||||
import project.Internal.Problem_Builder.Problem_Builder
|
||||
import project.Internal.Value_Type_Helpers
|
||||
import project.Position.Position
|
||||
import project.Set_Mode.Set_Mode
|
||||
import project.Sort_Column.Sort_Column
|
||||
import project.Table.Table
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Errors import Ambiguous_Column_Rename, Column_Type_Mismatch, Invalid_Aggregate_Column, Missing_Input_Columns, No_Common_Type, No_Input_Columns_Selected, No_Output_Columns, No_Such_Column, Too_Many_Column_Names_Provided
|
||||
|
||||
polyglot java import java.util.HashSet
|
||||
@ -500,7 +500,7 @@ filter_blank_rows table when treat_nans_as_blank =
|
||||
Currently, it relies on a hack - it checks if the object has a method
|
||||
`is_table` and if it returns `True`.
|
||||
is_column obj =
|
||||
known_types = ["Standard.Table.Data.Column.Column", "Standard.Database.DB_Column.DB_Column"]
|
||||
known_types = ["Standard.Table.Column.Column", "Standard.Database.DB_Column.DB_Column"]
|
||||
known_types.contains (Meta.get_qualified_type_name obj)
|
||||
|
||||
## PRIVATE
|
||||
|
@ -3,11 +3,11 @@ import Standard.Base.Data.Vector.No_Wrap
|
||||
import Standard.Base.Errors.Common.Index_Out_Of_Bounds
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import project.Data.Column_Ref.Column_Ref
|
||||
import project.Data.Expression.Expression
|
||||
import project.Data.Expression.Expression_Error
|
||||
import project.Data.Set_Mode.Set_Mode
|
||||
import project.Data.Table.Table
|
||||
import project.Column_Ref.Column_Ref
|
||||
import project.Expression.Expression
|
||||
import project.Expression.Expression_Error
|
||||
import project.Set_Mode.Set_Mode
|
||||
import project.Table.Table
|
||||
from project.Errors import Existing_Column, Invalid_Value_Type, Missing_Column, No_Such_Column
|
||||
|
||||
## PRIVATE
|
@ -2,12 +2,57 @@ from Standard.Base import all
|
||||
import Standard.Base.Data.Vector.No_Wrap
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Type.Enso_Types
|
||||
from project.Data.Type.Value_Type import Auto, Value_Type
|
||||
import project.Column.Column
|
||||
import project.Internal.Storage
|
||||
import project.Value_Type.Auto
|
||||
import project.Value_Type.Bits
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Errors import Invalid_Value_Type, No_Common_Type
|
||||
from project.Internal.Table_Helpers import is_column
|
||||
|
||||
polyglot java import org.enso.base.polyglot.NumericConverter
|
||||
polyglot java import org.enso.table.data.column.storage.type.IntegerType
|
||||
|
||||
## PRIVATE
|
||||
Finds the most specific `Value_Type` that can be used to hold the given
|
||||
value.
|
||||
|
||||
This method will still prefer default types used in the in-memory backend, so
|
||||
for integers it will return 64-bit integers even if the value could fit in a
|
||||
smaller one; and for Text values variable-length text will be preferred over
|
||||
fixed-length.
|
||||
most_specific_value_type : Any -> Boolean -> Value_Type
|
||||
most_specific_value_type value use_smallest=False =
|
||||
case value of
|
||||
_ : Float -> Value_Type.Float Bits.Bits_64
|
||||
_ : Boolean -> Value_Type.Boolean
|
||||
_ : Date -> Value_Type.Date
|
||||
_ : Time_Of_Day -> Value_Type.Time
|
||||
_ : Date_Time -> Value_Type.Date_Time
|
||||
i : Integer ->
|
||||
case NumericConverter.isBigInteger i of
|
||||
False -> case use_smallest of
|
||||
False -> Value_Type.Integer Bits.Bits_64
|
||||
True ->
|
||||
storage_type = IntegerType.smallestFitting i
|
||||
value_type = Storage.to_value_type storage_type
|
||||
# We do a small rewrite here - for integers we always return the Integer type, even if the value is small enough to fit in a Byte.
|
||||
if value_type == Value_Type.Byte then Value_Type.Integer Bits.Bits_16 else value_type
|
||||
True -> Value_Type.Decimal precision=Nothing scale=0
|
||||
text : Text ->
|
||||
length = text.length
|
||||
case use_smallest of
|
||||
False -> Value_Type.Char size=Nothing variable_length=True
|
||||
True ->
|
||||
case length > 0 of
|
||||
True -> Value_Type.Char size=length variable_length=False
|
||||
# Not using Char size=0 for empty strings, because that would be an invalid value.
|
||||
False -> Value_Type.Char size=1 variable_length=True
|
||||
|
||||
## TODO [RW] once we add Enso Native Object Type Value Type, we probably
|
||||
want to prefer it over Mixed
|
||||
_ -> Value_Type.Mixed
|
||||
|
||||
## PRIVATE
|
||||
Finds a type that can fit both a current type and a new type.
|
||||
reconcile_types current new = case current of
|
||||
@ -102,7 +147,7 @@ find_common_type types strict =
|
||||
find_argument_type : Any -> Boolean -> Value_Type | Nothing
|
||||
find_argument_type value infer_precise_type=True = if Nothing == value then Nothing else
|
||||
case is_column value of
|
||||
False -> Enso_Types.most_specific_value_type value use_smallest=True
|
||||
False -> most_specific_value_type value use_smallest=True
|
||||
True ->
|
||||
col_type = value.value_type
|
||||
if infer_precise_type && col_type == Value_Type.Mixed then value.inferred_precise_value_type else col_type
|
@ -6,14 +6,14 @@ from Standard.Base.Metadata.Widget import Multiple_Choice, Numeric_Input, Single
|
||||
from Standard.Base.System.File_Format import format_types
|
||||
from Standard.Base.Widget_Helpers import make_format_chooser
|
||||
|
||||
import project.Data.Aggregate_Column.Aggregate_Column
|
||||
import project.Data.Join_Condition.Join_Condition
|
||||
import project.Data.Join_Kind.Join_Kind
|
||||
import project.Data.Sort_Column.Sort_Column
|
||||
import project.Data.Table.Table
|
||||
import project.Data.Type.Value_Type.Auto
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Aggregate_Column.Aggregate_Column
|
||||
import project.Internal.Parse_Values_Helper
|
||||
import project.Join_Condition.Join_Condition
|
||||
import project.Join_Kind.Join_Kind
|
||||
import project.Sort_Column.Sort_Column
|
||||
import project.Table.Table
|
||||
import project.Value_Type.Auto
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Extensions.Table_Conversions import all
|
||||
|
||||
## PRIVATE
|
||||
|
@ -1,64 +1,60 @@
|
||||
from Standard.Base import all
|
||||
|
||||
import project.Data.Aggregate_Column.Aggregate_Column
|
||||
import project.Data.Blank_Selector.Blank_Selector
|
||||
import project.Data.Calculations.Column_Operation.Column_Operation
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Column_Ref.Column_Ref
|
||||
import project.Data.Column_Vector_Extensions
|
||||
import project.Data.Data_Formatter.Data_Formatter
|
||||
import project.Data.Join_Condition.Join_Condition
|
||||
import project.Data.Join_Kind.Join_Kind
|
||||
import project.Data.Match_Columns.Match_Columns
|
||||
import project.Data.Position.Position
|
||||
import project.Data.Report_Unmatched.Report_Unmatched
|
||||
import project.Data.Set_Mode.Set_Mode
|
||||
import project.Data.Simple_Expression.Simple_Calculation
|
||||
import project.Data.Simple_Expression.Simple_Expression
|
||||
import project.Data.Sort_Column.Sort_Column
|
||||
import project.Data.Table.Table
|
||||
import project.Data.Type.Value_Type.Auto
|
||||
import project.Data.Type.Value_Type.Bits
|
||||
import project.Data.Type.Value_Type.Value_Type
|
||||
import project.Aggregate_Column.Aggregate_Column
|
||||
import project.Blank_Selector.Blank_Selector
|
||||
import project.Column.Column
|
||||
import project.Column_Operation.Column_Operation
|
||||
import project.Column_Ref.Column_Ref
|
||||
import project.Data_Formatter.Data_Formatter
|
||||
import project.Delimited.Delimited_Format.Delimited_Format
|
||||
import project.Delimited.Quote_Style.Quote_Style
|
||||
import project.Excel.Excel_Format.Excel_Format
|
||||
import project.Excel.Excel_Range.Excel_Range
|
||||
import project.Excel.Excel_Workbook.Excel_Workbook
|
||||
import project.Extensions.Prefix_Name.Prefix_Name
|
||||
from project.Data.Constants import all
|
||||
from project.Data.Expression import expr
|
||||
from project.Delimited.Delimited_Format.Delimited_Format import Delimited
|
||||
import project.Join_Condition.Join_Condition
|
||||
import project.Join_Kind.Join_Kind
|
||||
import project.Match_Columns.Match_Columns
|
||||
import project.Position.Position
|
||||
import project.Prefix_Name.Prefix_Name
|
||||
import project.Set_Mode.Set_Mode
|
||||
import project.Simple_Expression.Simple_Calculation
|
||||
import project.Simple_Expression.Simple_Expression
|
||||
import project.Sort_Column.Sort_Column
|
||||
import project.Table.Table
|
||||
import project.Value_Type.Auto
|
||||
import project.Value_Type.Bits
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Constants import all
|
||||
from project.Expression import expr
|
||||
from project.Extensions.Column_Vector_Extensions import all
|
||||
from project.Extensions.Table_Conversions import all
|
||||
|
||||
export project.Data.Aggregate_Column.Aggregate_Column
|
||||
|
||||
export project.Data.Blank_Selector.Blank_Selector
|
||||
export project.Data.Calculations.Column_Operation.Column_Operation
|
||||
export project.Data.Column.Column
|
||||
export project.Data.Column_Ref.Column_Ref
|
||||
export project.Data.Column_Vector_Extensions
|
||||
export project.Data.Data_Formatter.Data_Formatter
|
||||
export project.Data.Join_Condition.Join_Condition
|
||||
export project.Data.Join_Kind.Join_Kind
|
||||
export project.Data.Match_Columns.Match_Columns
|
||||
export project.Data.Position.Position
|
||||
export project.Data.Report_Unmatched.Report_Unmatched
|
||||
export project.Data.Set_Mode.Set_Mode
|
||||
export project.Data.Simple_Expression.Simple_Calculation
|
||||
export project.Data.Simple_Expression.Simple_Expression
|
||||
export project.Data.Sort_Column.Sort_Column
|
||||
export project.Data.Table.Table
|
||||
export project.Data.Type.Value_Type.Auto
|
||||
export project.Data.Type.Value_Type.Bits
|
||||
export project.Data.Type.Value_Type.Value_Type
|
||||
export project.Aggregate_Column.Aggregate_Column
|
||||
export project.Blank_Selector.Blank_Selector
|
||||
export project.Column.Column
|
||||
export project.Column_Operation.Column_Operation
|
||||
export project.Column_Ref.Column_Ref
|
||||
export project.Data_Formatter.Data_Formatter
|
||||
export project.Delimited.Delimited_Format.Delimited_Format
|
||||
export project.Delimited.Quote_Style.Quote_Style
|
||||
export project.Excel.Excel_Format.Excel_Format
|
||||
export project.Excel.Excel_Range.Excel_Range
|
||||
export project.Excel.Excel_Workbook.Excel_Workbook
|
||||
export project.Extensions.Prefix_Name.Prefix_Name
|
||||
from project.Data.Constants export all
|
||||
from project.Data.Expression export expr
|
||||
from project.Delimited.Delimited_Format.Delimited_Format export Delimited
|
||||
export project.Join_Condition.Join_Condition
|
||||
export project.Join_Kind.Join_Kind
|
||||
export project.Match_Columns.Match_Columns
|
||||
export project.Position.Position
|
||||
export project.Prefix_Name.Prefix_Name
|
||||
export project.Set_Mode.Set_Mode
|
||||
export project.Simple_Expression.Simple_Calculation
|
||||
export project.Simple_Expression.Simple_Expression
|
||||
export project.Sort_Column.Sort_Column
|
||||
export project.Table.Table
|
||||
export project.Value_Type.Auto
|
||||
export project.Value_Type.Bits
|
||||
export project.Value_Type.Value_Type
|
||||
from project.Constants export all
|
||||
from project.Expression export expr
|
||||
from project.Extensions.Column_Vector_Extensions export all
|
||||
from project.Extensions.Table_Conversions export all
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Runtime.State
|
||||
|
||||
import project.Data.Report_Unmatched.Report_Unmatched
|
||||
import project.Constants.Report_Unmatched
|
||||
from project.Errors import Column_Count_Mismatch, No_Output_Columns, Unmatched_Columns
|
||||
|
||||
## Specifies a column matching strategy.
|
@ -1,8 +1,8 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Data.Array_Proxy.Array_Proxy
|
||||
|
||||
import project.Data.Table.Table
|
||||
import project.Internal.Widget_Helpers
|
||||
import project.Table.Table
|
||||
|
||||
## Represents a single row of some in-memory Table.
|
||||
type Row
|
@ -5,9 +5,9 @@ import Standard.Base.Metadata.Widget
|
||||
from Standard.Base.Metadata.Choice import Option
|
||||
from Standard.Base.Metadata.Widget import Single_Choice
|
||||
|
||||
import project.Data.Column_Ref.Column_Ref
|
||||
import project.Data.Expression.Expression
|
||||
import project.Extensions.Table_Ref.Table_Ref
|
||||
import project.Column_Ref.Column_Ref
|
||||
import project.Expression.Expression
|
||||
import project.Internal.Table_Ref.Table_Ref
|
||||
import project.Internal.Widget_Helpers
|
||||
from project.Internal.Filter_Condition_Helpers import make_filter_column
|
||||
|
@ -19,29 +19,17 @@ import Standard.Base.System.File.Generic.Writable_File.Writable_File
|
||||
from Standard.Base.Metadata import Display, make_single_choice, Widget
|
||||
from Standard.Base.Widget_Helpers import make_delimiter_selector, make_format_chooser
|
||||
|
||||
import project.Data.Aggregate_Column.Aggregate_Column
|
||||
import project.Data.Blank_Selector.Blank_Selector
|
||||
import project.Data.Column as Column_Module
|
||||
import project.Data.Column.Column
|
||||
import project.Data.Column_Ref.Column_Ref
|
||||
import project.Data.Constants.Previous_Value
|
||||
import project.Data.Data_Formatter.Data_Formatter
|
||||
import project.Data.Expression.Expression
|
||||
import project.Data.Expression.Expression_Error
|
||||
import project.Data.Join_Condition.Join_Condition
|
||||
import project.Data.Join_Kind.Join_Kind
|
||||
import project.Data.Match_Columns as Match_Columns_Helpers
|
||||
import project.Data.Match_Columns.Match_Columns
|
||||
import project.Data.Position.Position
|
||||
import project.Data.Report_Unmatched.Report_Unmatched
|
||||
import project.Data.Row.Row
|
||||
import project.Data.Set_Mode.Set_Mode
|
||||
import project.Data.Simple_Expression.Simple_Expression
|
||||
import project.Data.Sort_Column.Sort_Column
|
||||
import project.Aggregate_Column.Aggregate_Column
|
||||
import project.Blank_Selector.Blank_Selector
|
||||
import project.Column.Column
|
||||
import project.Column_Ref.Column_Ref
|
||||
import project.Constants.Previous_Value
|
||||
import project.Constants.Report_Unmatched
|
||||
import project.Data_Formatter.Data_Formatter
|
||||
import project.Delimited.Delimited_Format.Delimited_Format
|
||||
import project.Extensions.Prefix_Name.Prefix_Name
|
||||
import project.Expression.Expression
|
||||
import project.Expression.Expression_Error
|
||||
import project.Extensions.Table_Conversions
|
||||
import project.Extensions.Table_Ref.Table_Ref
|
||||
import project.Internal.Add_Row_Number
|
||||
import project.Internal.Aggregate_Column_Helper
|
||||
import project.Internal.Column_Naming_Helper.Column_Naming_Helper
|
||||
@ -59,9 +47,21 @@ import project.Internal.Replace_Helpers
|
||||
import project.Internal.Split_Tokenize
|
||||
import project.Internal.Table_Helpers
|
||||
import project.Internal.Table_Helpers.Table_Column_Helper
|
||||
import project.Internal.Table_Ref.Table_Ref
|
||||
import project.Internal.Widget_Helpers
|
||||
from project.Data.Column import get_item_string, normalize_string_for_display
|
||||
from project.Data.Type.Value_Type import Auto, Value_Type
|
||||
import project.Join_Condition.Join_Condition
|
||||
import project.Join_Kind.Join_Kind
|
||||
import project.Match_Columns as Match_Columns_Helpers
|
||||
import project.Match_Columns.Match_Columns
|
||||
import project.Position.Position
|
||||
import project.Prefix_Name.Prefix_Name
|
||||
import project.Row.Row
|
||||
import project.Set_Mode.Set_Mode
|
||||
import project.Simple_Expression.Simple_Expression
|
||||
import project.Sort_Column.Sort_Column
|
||||
import project.Value_Type.Auto
|
||||
import project.Value_Type.Value_Type
|
||||
from project.Column import get_item_string, make_storage_builder_for_type, normalize_string_for_display
|
||||
from project.Errors import all
|
||||
from project.Internal.Filter_Condition_Helpers import make_filter_column
|
||||
from project.Internal.Lookup_Helpers import make_java_lookup_column_description
|
||||
@ -792,7 +792,7 @@ type Table
|
||||
new_columns = validated.valid_columns.map c->(Aggregate_Column_Helper.java_aggregator c.first c.second)
|
||||
java_table = index.makeTable new_columns
|
||||
if validated.old_style.not then Table.Value java_table else
|
||||
Warning.attach (Deprecated.Warning "Standard.Table.Data.Aggregate_Column.Aggregate_Column" "Group_By" "Deprecated: `Group_By` constructor has been deprecated, use the `group_by` argument instead.") (Table.Value java_table)
|
||||
Warning.attach (Deprecated.Warning "Standard.Table.Aggregate_Column.Aggregate_Column" "Group_By" "Deprecated: `Group_By` constructor has been deprecated, use the `group_by` argument instead.") (Table.Value java_table)
|
||||
|
||||
## ALIAS sort
|
||||
GROUP Standard.Base.Selections
|
||||
@ -1527,7 +1527,7 @@ type Table
|
||||
filter_by_expression self expression on_problems=Report_Warning =
|
||||
column = self.evaluate_expression (Expression.Value expression) on_problems
|
||||
result = self.filter column Filter_Condition.Is_True
|
||||
Warning.attach (Deprecated.Warning "Standard.Table.Data.Table.Table" "filter_by_expression" "Deprecated: use `filter` with an `Expression` instead.") result
|
||||
Warning.attach (Deprecated.Warning "Standard.Table.Table.Table" "filter_by_expression" "Deprecated: use `filter` with an `Expression` instead.") result
|
||||
|
||||
## ALIAS first, head, last, limit, sample, slice, tail, top
|
||||
GROUP Standard.Base.Selections
|
||||
@ -1741,7 +1741,7 @@ type Table
|
||||
evaluate_expression : Text | Expression -> Problem_Behavior -> Column ! No_Such_Column | Invalid_Value_Type | Expression_Error
|
||||
evaluate_expression self expression:(Text | Expression) on_problems:Problem_Behavior=Report_Warning = if expression.is_a Text then self.evaluate_expression (Expression.Value expression) on_problems else
|
||||
get_column name = self.at name
|
||||
new_column = Expression.evaluate expression get_column self.make_constant_column "Standard.Table.Data.Column" "Column" Column.var_args_functions
|
||||
new_column = Expression.evaluate expression get_column self.make_constant_column "Standard.Table.Column" "Column" Column.var_args_functions
|
||||
problems = Warning.get_all new_column . map .value
|
||||
result = new_column.rename (self.column_naming_helper.sanitize_name expression.expression)
|
||||
on_problems.attach_problems_before problems <|
|
||||
@ -2662,7 +2662,7 @@ type Table
|
||||
import Standard.Examples
|
||||
from Standard.Table import Delimited
|
||||
|
||||
example_to_csv = Examples.inventory_table.write (Enso_Project.data / "example_csv_output.csv") (Delimited delimiter="," headers=False)
|
||||
example_to_csv = Examples.inventory_table.write (Enso_Project.data / "example_csv_output.csv") (Delimited_Format.Delimited delimiter="," headers=False)
|
||||
|
||||
> Example
|
||||
Write a table to an XLSX file.
|
||||
@ -3091,7 +3091,7 @@ make_join_helpers left_table right_table =
|
||||
A helper that efficiently concatenates storages of in-memory columns.
|
||||
concat_columns column_set all_tables result_type result_row_count on_problems =
|
||||
Java_Problems.with_problem_aggregator on_problems java_problem_aggregator->
|
||||
storage_builder = Column_Module.make_storage_builder_for_type result_type on_problems initial_size=result_row_count java_problem_aggregator
|
||||
storage_builder = make_storage_builder_for_type result_type on_problems initial_size=result_row_count java_problem_aggregator
|
||||
column_set.column_indices.zip all_tables i-> parent_table->
|
||||
case i of
|
||||
Nothing ->
|
@ -2,7 +2,7 @@ from Standard.Base import all
|
||||
import Standard.Base.Data.Numbers.Positive_Integer
|
||||
import Standard.Base.Errors.Illegal_Argument.Illegal_Argument
|
||||
|
||||
import project.Data.Type.Value_Type_Helpers
|
||||
import project.Internal.Value_Type_Helpers
|
||||
from project.Errors import Invalid_Value_Type
|
||||
|
||||
## Type to represent the different sizes of integer or float storage.
|
@ -1,5 +1,5 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Table.Data.Table.Table
|
||||
from Standard.Table import Table
|
||||
|
||||
## PRIVATE
|
||||
goal_placeholder = "__$$GOAL$$__"
|
||||
|
@ -2,7 +2,7 @@ from Standard.Base import all
|
||||
import Standard.Base.Data.Array_Proxy.Array_Proxy
|
||||
from Standard.Base.Data.Json import render
|
||||
|
||||
import Standard.Table.Data.Row.Row
|
||||
import Standard.Table.Row.Row
|
||||
from Standard.Table import Column, Table
|
||||
|
||||
import project.Id.Id
|
||||
|
@ -1,16 +1,15 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Base.Data.Vector.Builder
|
||||
|
||||
import Standard.Table.Data.Column.Column
|
||||
import Standard.Table.Data.Row.Row
|
||||
import Standard.Table.Data.Table.Table
|
||||
import Standard.Table.Row.Row
|
||||
from Standard.Table import Column, Table
|
||||
|
||||
import Standard.Database.DB_Column.DB_Column
|
||||
import Standard.Database.DB_Table.DB_Table
|
||||
|
||||
import project.Helpers
|
||||
|
||||
# TODO add an initial offset to fully support lazy visualizations
|
||||
## TODO add an initial offset to fully support lazy visualizations
|
||||
|
||||
## PRIVATE
|
||||
|
||||
|
@ -69,14 +69,14 @@ public class WarningInstrumentationTest {
|
||||
public void instrumentValueWithWarnings() throws Exception {
|
||||
var metadata = new Metadata("");
|
||||
|
||||
var idOp1 = metadata.addItem(151, 34, null);
|
||||
var idOp2 = metadata.addItem(202, 31, null);
|
||||
var idOp3 = metadata.addItem(250, 13, null);
|
||||
var idOp1 = metadata.addItem(140, 34, null);
|
||||
var idOp2 = metadata.addItem(191, 31, null);
|
||||
var idOp3 = metadata.addItem(239, 13, null);
|
||||
var rawCode =
|
||||
"""
|
||||
from Standard.Base import all
|
||||
from Standard.Base.Warning import Warning
|
||||
from Standard.Table.Data.Table import Table
|
||||
from Standard.Table import Table
|
||||
|
||||
run column_name =
|
||||
operator1 = Table.new [[column_name, [1,2,3]]]
|
||||
|
@ -1178,7 +1178,7 @@ public class EnsoParserTest {
|
||||
"""
|
||||
suite =
|
||||
Test.specify "should quote values containing the comment symbol if comments are enabled" <|
|
||||
format = Delimited ',' . with_comments
|
||||
format = Delimited_Format.Delimited ',' . with_comments
|
||||
table.write file format on_problems=Report_Error . should_succeed
|
||||
expected_text_2 = normalize_lines <| \"""
|
||||
"#",B
|
||||
|
@ -11,7 +11,7 @@ from Standard.AWS.Errors import AWS_SDK_Error, More_Records_Available, S3_Error,
|
||||
import Standard.AWS.Internal.S3_Path.S3_Path
|
||||
|
||||
# Needed for custom formats test
|
||||
from Standard.Table import Table, Excel_Format, Delimited
|
||||
from Standard.Table import Table, Excel_Format, Delimited_Format
|
||||
# Needed for correct `Table.should_equal`
|
||||
import enso_dev.Table_Tests.Util
|
||||
|
||||
@ -551,7 +551,7 @@ add_specs suite_builder =
|
||||
raw_content = Data_Link_Format.read_raw_config (enso_project.data / "simple.datalink")
|
||||
Data_Link_Format.write_raw_config s3_link raw_content replace_existing=True . should_succeed
|
||||
Panic.with_finalizer s3_link.delete <|
|
||||
r = s3_link.read (Delimited " " headers=False)
|
||||
r = s3_link.read (Delimited_Format.Delimited " " headers=False)
|
||||
r.should_be_a Table
|
||||
r.column_names . should_equal ["Column 1", "Column 2"]
|
||||
r.rows.at 0 . to_vector . should_equal ["Hello", "WORLD!"]
|
||||
|
@ -1,7 +1,7 @@
|
||||
from Standard.Base import all
|
||||
|
||||
from Standard.Table import all
|
||||
import Standard.Table.Data.Type.Storage
|
||||
import Standard.Table.Internal.Storage
|
||||
import Standard.Table.Internal.Java_Problems
|
||||
|
||||
from Standard.Test import Bench
|
||||
|
@ -1,5 +1,5 @@
|
||||
from Standard.Base import all
|
||||
import Standard.Table.Data.Table.Table
|
||||
from Standard.Table import Table
|
||||
|
||||
import Standard.Geo
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user