Giter VIP home page Giter VIP logo

virtual-schema-common-lua's Introduction

virtual-schema-common-lua (VSCL)

This project contains a base library that abstracts Exasol's Virtual Schema API and provides a convenient starting point for implementing Lua-based Virtual Schemas.

Why would you want to implement a Virtual Schema in Lua?

Because it is blazingly fast. Exasol has a built-in Lua interpreter for scripting and there is no more direct approach to extend Exasol with your own functions.

Information for Users

Users are developers including this library into their VS and using the API.

Information for Developers

Developers in this context are building or modifying this library.

virtual-schema-common-lua's People

Contributors

kaklakariada avatar redcatbear avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

virtual-schema-common-lua's Issues

List new Query Renderer modules in rock-spec

Situation

We added a couple new modules (classes) in the course of the refactoring of the query renderer. Those modules need to be listed in the rock spec.

Acceptance Criteria

  • All query renderer modules listed in rock spec.

Support `GROUP BY`

Situation

Looks like I overlooked GROUP BY in my feature list.

Acceptance Criteria

  • Unit test proves that GROUP BY is rendered correctly.

Fix failing dependencies_check.yml

Error: ] Some problems were encountered while processing the POMs:
[FATAL] Non-readable POM /home/runner/work/virtual-schema-common-lua/virtual-schema-common-lua/pom.xml:
(No such file or directory)

Add missing abstract methods

Acceptance criteria

  • Each API method of the AbstractVirtualSchemaAdapter has either a default implementation or is an abstract method.

Boolean VS properties

Situation

Virtual Schemas often need properties that act as switches. To avoid code duplication, we need to be able to check if a boolean property is:

  • true <-- property set to value true
  • false <-- property set to any other value or property not set

Acceptance Criteria

  • Property methods isTrue and isFalse supported.

Workaround for (x)pcall problem in core

Situation

Currently error message processing is broken in the core database when you use pcall or xpcall (SPOT-13221). Until the fix is available in the core database, we have to live without those.

Acceptance Criteria

  • Workaround for xpcall exists.

Release 2.0.0

Prepare release 2.0.0. This is a breaking change, since the new OO-style impacts object creation and initialization calls through the API.

VS Workaround for `GROUP BY <integer>`

Summary

When users combine integer constants as expressions with DISTINCT, the engine pushes down GROUP BY <integer-constant>. Exasol interprets this as "group by column number", which yields wrong results. What should happen here is that you get a result with a single group. GROUP BY TRUE, GROUP BY '0' or any other non-integer constant will work as expected.

Note that some databases interpret this as "group by integer constant". So the behavior is database specific. The reason is that this case is not covered by the SQL standard.

Workaround:

The adapter should work around this by turning GROUP BY <integer-constant> into GROUP BY <other-constant>.

Theoretically that should be done on a db-by-db basis, but that is too much effort, so a general workaround in VSCL and VSCJ should be implemented. This can be overridden in the dialect if there is ever the need.

Features

  • Turns GROUP BY <integer-constant> into GROUP BY <other-constant>

Extract common library from RLSL

  • Create the standard layout of the repository
  • Migrate code and tests from exasol/row-level-security-lua
  • Refactor for use as library
  • Add developer guide

Move validators from EVSL

Situation

Currently the Exasol Virtual Schema Lua (EVSL) contains a set of validators that are useful for all Virtual Schemas. They should be moved to the common base library for all VS.

Acceptance Criteria

  1. Validators moved
  2. Unit tests moved

Change VSCL namespace to `exasol.vscl`

Situation

To avoid collisions and make checking installations easier, this library needs its unique namespace. Switch to 'exasol.vscl'.

Acceptance Criteria

  • Namespace changed from exasolvs to exasol.vscl

Use improved OOP

Situation

The standard OOP proposed in the Lua books has some problems when you need to safely initialize objects of derived classes, so that the base classes are initialized too. There is a better way using a protected _init method. In the course of using this style, the constructor can and should also take the arguments explicitly instead of a preinitialized object.

Acceptance Criteria

  1. Removed create methods
  2. new gets explicit parameters
  3. Protected _init method

Render interval types

Acceptance Criteria

  1. VSCL renders interval literals
  2. VSCL renders interval type definitions

Use ExaError

Acceptance Criteria

  1. Use ExaError to generate error messages.

Update VSCL developer guide

Acceptance Criteria

  • Using the rockspec to resolve dependencies is explained.
  • EmmyLua is explained for IntelliJ

Schould `COUNT(C1, C2)` work?

Situation

Even with FN_AGG_COUNT + FN_AGG_COUNT_TUPLE activated, we get the following error in the integration test:

Function COUNT should not be called with 2 arguments. Possible number of arguments: 0, 1

Acceptance Criteria

  1. Clarify if COUNT(C1, C2) is supposed to work
  2. If no: document under "known issues"
  3. If yes: fix test and implementation or write ticket to fix VS core

Improve Import

Acceptance criteria

  1. ImportBuilder.colum_types takes a table as first argument instead of a list of types as separate arguments
  2. If the first argument is 'nil', then the IMPORT is created without the INTO(...) clause
  3. If the first argument is an empty table, then the IMPORT is created without the INTO(...) clause

This is a breaking change.

Split SQL Renderer

Situation

At the moment the complete SQL rendering is in one large module. This is not sustainable. We need to split the renderer into smaller, more manageable pieces.

Acceptance criteria

  1. Renderer split
  2. All test still green

Property overriding

Situation

As discussed in exasol/virtual-schema-common-java#247, the API for the set properties request defines that both old an new properties are listed. Since the original API documentation was incomplete, only the old properties are provided through the VSCL interface.

What we need is to

  1. Extend the the VSCL interface for the "set property" request with an additional parameter holding the new properties
  2. Provide a way to merge both.

Acceptance Criteria

  1. "Set properties" request got additional parameter for new properties
  2. Adapter properties class has a merge function

VSCL CI build

Situation

Currently VSCL ha no CI build. We need one.

Acceptance Criteria

  • CI build runs successfully in GHA
  • CI build creates a LuaRock

Release 2.0.1

Acceptance Criteria

  1. Change log entry
  2. Release data up-to-date
  3. Dependencies up-to-date

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.