Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle when ignite data schema is different from VUU table schema #1167

Closed
naleeha opened this issue Jan 29, 2024 · 2 comments
Closed

Handle when ignite data schema is different from VUU table schema #1167

naleeha opened this issue Jan 29, 2024 · 2 comments
Assignees

Comments

@naleeha
Copy link
Contributor

naleeha commented Jan 29, 2024

  • Currently done using a simple map for sorting - but the name of the columns on ignite and vuu table is hard coded. This needs to referenced from the ignite data schema and VUU table schema to avoid them getting out of sync with whats specified in the map
  • Need to support when ignite and vuu column names or the column types differ for filtering. Currently only works if they are the same

Places where we currently need to know the Ignite field names/types are

@naleeha
Copy link
Contributor Author

naleeha commented Jan 31, 2024

Currently we are experimenting with different ways of specifying the data (entity) schema on Ignite server side.

Looks like the fields defined using QueryEntity has api for getting the field name and values
https://ignite.apache.org/releases/latest/dotnetdoc/api/Apache.Ignite.Core.Cache.Configuration.QueryEntity.html#Apache_Ignite_Core_Cache_Configuration_QueryEntity_ValueFieldName

@naleeha
Copy link
Contributor Author

naleeha commented Jan 31, 2024

It would be good if the table schema we define for this can be used for all other usecases #853 (comment)

Started some spikes for ideas here https://github.com/naleeha/vuu/tree/table_ignite_schema_spike

naleeha added a commit to naleeha/vuu that referenced this issue Jan 31, 2024
@junaidzm13 junaidzm13 self-assigned this Feb 5, 2024
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 6, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 6, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 7, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
- refactors and improves the flow of IgniteOrderDataProvider.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 7, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
- refactors and improves the flow of IgniteOrderDataProvider.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 7, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
- refactors and improves the flow of IgniteOrderDataProvider.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 7, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
- refactors and improves the flow of IgniteOrderDataProvider.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 7, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
- refactors and improves the flow of IgniteOrderDataProvider.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 7, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
- refactors and improves the flow of IgniteOrderDataProvider.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 7, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
- refactors and improves the flow of IgniteOrderDataProvider.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 7, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- potential design/performance tradeoff: inside IgniteOrderStore.findChilOrder
  method toChildOrder can be a performance hit, can keep as raw list as we
  convert back to a list anyways when mapping to row data.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
- refactors and improves the flow of IgniteOrderDataProvider.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 8, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- potential design/performance tradeoff: inside IgniteOrderStore.findChilOrder
  method toChildOrder can be a performance hit, can keep as raw list as we
  convert back to a list anyways when mapping to row data.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
- refactors and improves the flow of IgniteOrderDataProvider.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 8, 2024
- convert map->filter pipeline to simply a flatMap in SchemaMapper
- SchemaMapper to take in separate tableColumns & fields map
  (external->internal) to allow better separation of concerns
  around DataModule & DataProvider.
- clean-up validation logic for SchemaMapper &
  IgniteEntitySchemaBuilder
- Small refactoring in DataProvider to define vals for HOFs
- ExternalStoreEntitySchema to use val instead of def since
  we're assuming that schemaFields will stay the same once
  schema's instantiated.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 8, 2024
- convert map->filter pipeline to simply a flatMap in SchemaMapper
- SchemaMapper to take in separate tableColumns & fields map
  (external->internal) to allow better separation of concerns
  around DataModule & DataProvider.
- clean-up validation logic for SchemaMapper &
  IgniteEntitySchemaBuilder
- Small refactoring in DataProvider to define vals for HOFs
- ExternalStoreEntitySchema to use val instead of def since
  we're assuming that schemaFields will stay the same once
  schema's instantiated.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 8, 2024
- convert map->filter pipeline to simply a flatMap in SchemaMapper
- SchemaMapper to take in separate tableColumns & fields map
  (external->internal) to allow better separation of concerns
  around DataModule & DataProvider.
- clean-up validation logic for SchemaMapper &
  IgniteEntitySchemaBuilder
- Small refactoring in DataProvider to define vals for HOFs
- ExternalStoreEntitySchema to use val instead of def since
  we're assuming that schemaFields will stay the same once
  schema's instantiated.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 8, 2024
- convert map->filter pipeline to simply a flatMap in SchemaMapper
- SchemaMapper to take in separate tableColumns & fields map
  (external->internal) to allow better separation of concerns
  around DataModule & DataProvider.
- clean-up validation logic for SchemaMapper &
  IgniteEntitySchemaBuilder
- Small refactoring in DataProvider to define vals for HOFs
- ExternalStoreEntitySchema to use val instead of def since
  we're assuming that schemaFields will stay the same once
  schema's instantiated.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 8, 2024
- convert map->filter pipeline to simply a flatMap in SchemaMapper
- SchemaMapper to take in separate tableColumns & fields map
  (external->internal) to allow better separation of concerns
  around DataModule & DataProvider.
- clean-up validation logic for SchemaMapper &
  IgniteEntitySchemaBuilder
- Small refactoring in DataProvider to define vals for HOFs
- ExternalStoreEntitySchema to use val instead of def since
  we're assuming that schemaFields will stay the same once
  schema's instantiated.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 8, 2024
- both does essentially the same lazy eval, the difference is that
  the Iterator is only for single traversal whereas the other
  memoises the results. Using Iterator as its simpler and
  works for our use-cases.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 8, 2024
- both does essentially the same lazy eval, the difference is that
  the Iterator is only for single traversal whereas the other
  memoises the results. Using Iterator as its simpler and
  works for our use-cases.
heswell pushed a commit that referenced this issue Feb 8, 2024
)

* #1167 handle when external data schema is different from internal

- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- potential design/performance tradeoff: inside IgniteOrderStore.findChilOrder
  method toChildOrder can be a performance hit, can keep as raw list as we
  convert back to a list anyways when mapping to row data.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
- refactors and improves the flow of IgniteOrderDataProvider.

* #1167 suggestions from PR review + clean-ups

- convert map->filter pipeline to simply a flatMap in SchemaMapper
- SchemaMapper to take in separate tableColumns & fields map
  (external->internal) to allow better separation of concerns
  around DataModule & DataProvider.
- clean-up validation logic for SchemaMapper &
  IgniteEntitySchemaBuilder
- Small refactoring in DataProvider to define vals for HOFs
- ExternalStoreEntitySchema to use val instead of def since
  we're assuming that schemaFields will stay the same once
  schema's instantiated.

* #1167 use Iterator instead of LazyList for lazy eval

- both does essentially the same lazy eval, the difference is that
  the Iterator is only for single traversal whereas the other
  memoises the results. Using Iterator as its simpler and
  works for our use-cases.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 9, 2024
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 9, 2024
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 13, 2024
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 13, 2024
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 13, 2024
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 13, 2024
- IgniteEntitySchema's invalid index exception to check for and include
  all invalid indexes
- SchemaMapper validation to not check for missing columns in fields
  map since there's a use-case (basket constituents) where it makes
  sense to not specify all internal columns in the fields map.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 13, 2024
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Feb 13, 2024
chrisjstevo pushed a commit that referenced this issue Feb 13, 2024
chrisjstevo pushed a commit that referenced this issue Feb 13, 2024
- IgniteEntitySchema's invalid index exception to check for and include
  all invalid indexes
- SchemaMapper validation to not check for missing columns in fields
  map since there's a use-case (basket constituents) where it makes
  sense to not specify all internal columns in the fields map.
rumakt pushed a commit to rumakt/vuu that referenced this issue Feb 15, 2024
- uses SchemaMapper to build the schema mappings b/w
  external and internal.
- potential design/performance tradeoff: inside IgniteOrderStore.findChilOrder
  method toChildOrder can be a performance hit, can keep as raw list as we
  convert back to a list anyways when mapping to row data.
- Sort + Filters to use the mapper to build SQL queries instead
  of internal table def.
- refactors and improves the flow of IgniteOrderDataProvider.

* finos#1167 suggestions from PR review + clean-ups

- convert map->filter pipeline to simply a flatMap in SchemaMapper
- SchemaMapper to take in separate tableColumns & fields map
  (external->internal) to allow better separation of concerns
  around DataModule & DataProvider.
- clean-up validation logic for SchemaMapper &
  IgniteEntitySchemaBuilder
- Small refactoring in DataProvider to define vals for HOFs
- ExternalStoreEntitySchema to use val instead of def since
  we're assuming that schemaFields will stay the same once
  schema's instantiated.

* finos#1167 use Iterator instead of LazyList for lazy eval

- both does essentially the same lazy eval, the difference is that
  the Iterator is only for single traversal whereas the other
  memoises the results. Using Iterator as its simpler and
  works for our use-cases.
rumakt pushed a commit to rumakt/vuu that referenced this issue Feb 15, 2024
rumakt pushed a commit to rumakt/vuu that referenced this issue Feb 15, 2024
- IgniteEntitySchema's invalid index exception to check for and include
  all invalid indexes
- SchemaMapper validation to not check for missing columns in fields
  map since there's a use-case (basket constituents) where it makes
  sense to not specify all internal columns in the fields map.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 17, 2024
- changes mainly around better naming and types, resulting
  in easier to use API.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 17, 2024
- invloves related refactoring and clean-ups in apache-ignite example.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 17, 2024
- a new apply method without a field->column map param, helpful
  when there are too many fields and a user wants a simple one-one
  mapping.
- add documentation where required for improved DevEx.
- also now we use Array DS for SchemaMapper.toInternalRowMap for
  constant time access.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 17, 2024
- a new apply method without a field->column map param, helpful
  when there are too many fields and a user wants a simple one-one
  mapping.
- add documentation where required for improved DevEx.
- also now we use Array DS for SchemaMapper.toInternalRowMap for
  constant time access.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 17, 2024
- changes mainly around better naming and types, resulting
  in easier to use API.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 17, 2024
- invloves related refactoring and clean-ups in apache-ignite example.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 17, 2024
- a new apply method without a field->column map param, helpful
  when there are too many fields and a user wants a simple one-one
  mapping.
- add documentation where required for improved DevEx.
- also now we use Array DS for SchemaMapper.toInternalRowMap for
  constant time access.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 18, 2024
- changes mainly around better naming and types, resulting
  in easier to use API.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 18, 2024
- invloves related refactoring and clean-ups in apache-ignite example.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 18, 2024
- a new apply method without a field->column map param, helpful
  when there are too many fields and a user wants a simple one-one
  mapping.
- add documentation where required for improved DevEx.
- also now we use Array DS for SchemaMapper.toInternalRowMap for
  constant time access.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 18, 2024
- changes mainly around better naming and types, resulting
  in easier to use API.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 18, 2024
- invloves related refactoring and clean-ups in apache-ignite example.
junaidzm13 added a commit to junaidzm13/vuu that referenced this issue Mar 18, 2024
- a new apply method without a field->column map param, helpful
  when there are too many fields and a user wants a simple one-one
  mapping.
- add documentation where required for improved DevEx.
- also now we use Array DS for SchemaMapper.toInternalRowMap for
  constant time access.
chrisjstevo pushed a commit that referenced this issue Mar 19, 2024
- changes mainly around better naming and types, resulting
  in easier to use API.
chrisjstevo pushed a commit that referenced this issue Mar 19, 2024
- invloves related refactoring and clean-ups in apache-ignite example.
chrisjstevo pushed a commit that referenced this issue Mar 19, 2024
- a new apply method without a field->column map param, helpful
  when there are too many fields and a user wants a simple one-one
  mapping.
- add documentation where required for improved DevEx.
- also now we use Array DS for SchemaMapper.toInternalRowMap for
  constant time access.
@naleeha naleeha closed this as completed Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants