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

Network address operators such as << and <<= do not work #3645

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Network address operators such as << and <<= do not work #3645

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2014-12-25 00:21:21 +0100
From: K <>
To: SQL devs <>
Version: 11.19.7 (Oct2014-SP1)
CC: @njnes

Last updated: 2015-05-07 12:37:54 +0200

Comment 20547

Date: 2014-12-25 00:21:21 +0100
From: K <>

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0
Build Identifier:

The 'inet' data type is documented as supporting certain binary operators such as << or <<= (to indicate subnet membership) in WHERE clauses, however these operators are not recognized as such by the command parser. Instead the << is interpreted as a left shift operator, and <<= is flagged as a syntax error.

Reproducible: Always

Steps to Reproduce:

  1. SELECT inet'192.168.0.1' << inet'192.168.0.0/24';
  2. SELECT inet'192.168.0.1' <<= inet'192.168.0.0.24';

Actual Results:

SELECT: no such binary operator 'left_shift(inet,inet)'

syntax error, unexpected '=' in: "select inet'192.168.0.1' <<=

Expected Results:

true

true

The code for these operators does appear in monetdb5/modules/atoms/inet.c, but somehow it seems that calls to the functions are missing in the parser code. Note however that other operators (such as =, <, >, etc) are handled correctly.

Comment 20651

Date: 2015-02-11 18:35:38 +0100
From: @njnes

added support for scanning <<= and >>=. Added the create function statements for <<(inet,int), >>(inet,inet) etc.

Comment 20652

Date: 2015-02-11 18:37:54 +0100
From: MonetDB Mercurial Repository <>

Changeset 7bd0698c0cdd made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=7bd0698c0cdd

Changeset description:

added <<=,>>= scanning to the sql lexer
added the create function's for <<(int,int) etc.
(added upgrade code for this)
Added test for bug #3645

Comment 20667

Date: 2015-02-19 14:28:56 +0100
From: MonetDB Mercurial Repository <>

Changeset e14ed64aa17e made by Martin van Dinther martin.van.dinther@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=e14ed64aa17e

Changeset description:

Approved new output after implementation of <<= and >>= as fix for bug #3645
@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants