Giter Site home page Giter Site logo

dblink's People

Contributors

mfelici avatar nerdlogic avatar oualib avatar roypaulin avatar rs-vertica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dblink's Issues

Adding a License File

I think we can start with the Apache 2.0 License.
We need to add the license in the folder.

Each file of the project should start with:

# (c) Copyright [2018-2022] Micro Focus or one of its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Connection using a DSN

As already discussed, it would be nice to be able to use directly a DSN as a parameter.

UDx side process exited abnormally if calling dblink multiple times in one query

=> SELECT l.id, l.description, tab_a.value value_a, tab_b.value value_b
-> FROM tab_local l
-> LEFT JOIN (SELECT DBLINK(USING PARAMETERS cid='orcl', query='SELECT * FROM tab1') OVER()) tab_a
->   ON tab_a.id = l.id
-> LEFT JOIN (SELECT DBLINK(USING PARAMETERS cid='orcl', query='SELECT * FROM tab1') OVER()) tab_b
->   ON tab_b.id = l.id;

ERROR 8092:  Failure in UDx RPC call InvokeProcessPartition() in User Defined Object [dblink]: UDx side process has exited abnormally

dblink has several global variables and doesn't consider being called multiple times in one query.

For example, in the first call, DBLinkFactory.getReturnType() sets the data type array pointer to 'Odt' global variable. Then, the same method sets a different pointer to that variable in the second call. After that, 'Obt' global variable is cleared by clean() method called by processPartition(). But the cleared pointer is for the second call. So the second call failed when accessing this variable.

Adding Unit Tests

@mfelici you'll be able to do it when the environment is ready.

@roypaulin This is the process (via Github Action):

  1. install Vertica
  2. install DBLink UDx
  3. install Postgres
  4. create the different Connection ID needed by DBLINK
  5. run a test script (it will be provided by @mfelici)
  6. if the script fails it raises an error otherwise it tells us it is working
  7. it closes and kills everything
  8. we can then create a protected branch: the code can only be merged if the tests succeeded and one reviewer approves

Remove docker dependencies from Makefile

We should remove any dependencies from docker in the Makefile. In case we need to take care of a "non standard" environment or a specific need than we will have to isolate the required changes:

  • either creating a different Makefile (for example Makefile.docker)
  • or adding specific rules
  • or - finally - adding ad-hoc directives and variables
    Default rules and standard behavior for the Makefile should work on a "normal" Linux system.

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.