René's URL Explorer Experiment


Title: Cannot form the union of more than two tables · Issue #926 · datajoint/datajoint-python · GitHub

Open Graph Title: Cannot form the union of more than two tables · Issue #926 · datajoint/datajoint-python

X Title: Cannot form the union of more than two tables · Issue #926 · datajoint/datajoint-python

Description: Bug Report Description I have a situation where I need to take the union over multiple tables (restriction or other methods will not work in this case). Taking the union over more than two tables throws an error. Reproducibility Include:...

Open Graph Description: Bug Report Description I have a situation where I need to take the union over multiple tables (restriction or other methods will not work in this case). Taking the union over more than two tables t...

X Description: Bug Report Description I have a situation where I need to take the union over multiple tables (restriction or other methods will not work in this case). Taking the union over more than two tables t...

Opengraph URL: https://github.com/datajoint/datajoint-python/issues/926

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot form the union of more than two tables","articleBody":"## Bug Report\r\n\r\n### Description\r\nI have a situation where I need to take the union over multiple tables (restriction or other methods will not work in this case). Taking the union over more than two tables throws an error.\r\n\r\n### Reproducibility\r\nInclude:\r\n- OS (MACOS)\r\n- Python Version 3.8.8\r\n- MySQL Deployment Strategy (remote)\r\n- DataJoint Version 0.13.2\r\n\r\nThis is a trivial example that seems to reproduce the issue:\r\n```python\r\n@schema\r\nclass Params(dj.Lookup):\r\n    definition = \"\"\"\r\n    params_id: tinyint unsigned\r\n    \"\"\"\r\n\r\nParams.insert([[x] for x in range(3)])\r\n\r\nparams = [Params \u0026 {'params_id': x} for x in range(3)]\r\n\r\nparams[0] + params[1] + params[2]\r\n```\r\n\r\nError stack:\r\n```console\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/IPython/core/formatters.py in __call__(self, obj)\r\n    700                 type_pprinters=self.type_printers,\r\n    701                 deferred_pprinters=self.deferred_printers)\r\n--\u003e 702             printer.pretty(obj)\r\n    703             printer.flush()\r\n    704             return stream.getvalue()\r\n\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/IPython/lib/pretty.py in pretty(self, obj)\r\n    392                         if cls is not object \\\r\n    393                                 and callable(cls.__dict__.get('__repr__')):\r\n--\u003e 394                             return _repr_pprint(obj, self, cycle)\r\n    395 \r\n    396             return _default_pprint(obj, self, cycle)\r\n\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)\r\n    698     \"\"\"A pprint that just redirects to the normal repr function.\"\"\"\r\n    699     # Find newlines and replace them with p.break_()\r\n--\u003e 700     output = repr(obj)\r\n    701     lines = output.splitlines()\r\n    702     with p.group():\r\n\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/datajoint/expression.py in __repr__(self)\r\n    527         :rtype: str\r\n    528         \"\"\"\r\n--\u003e 529         return super().__repr__() if config['loglevel'].lower() == 'debug' else self.preview()\r\n    530 \r\n    531     def preview(self, limit=None, width=None):\r\n\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/datajoint/expression.py in preview(self, limit, width)\r\n    531     def preview(self, limit=None, width=None):\r\n    532         \"\"\" :return: a string of preview of the contents of the query. \"\"\"\r\n--\u003e 533         return preview(self, limit, width)\r\n    534 \r\n    535     def _repr_html_(self):\r\n\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/datajoint/preview.py in preview(query_expression, limit, width)\r\n     11     if width is None:\r\n     12         width = config['display.width']\r\n---\u003e 13     tuples = rel.fetch(limit=limit + 1, format=\"array\")\r\n     14     has_more = len(tuples) \u003e limit\r\n     15     tuples = tuples[:limit]\r\n\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/datajoint/fetch.py in __call__(self, offset, limit, order_by, format, as_dict, squeeze, download_path, *attrs)\r\n    190                 ret = return_values[0] if len(attrs) == 1 else return_values\r\n    191         else:  # fetch all attributes as a numpy.record_array or pandas.DataFrame\r\n--\u003e 192             cur = self._expression.cursor(\r\n    193                 as_dict=as_dict, limit=limit, offset=offset, order_by=order_by)\r\n    194             heading = self._expression.heading\r\n\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/datajoint/expression.py in cursor(self, offset, limit, order_by, as_dict)\r\n    511         if offset and limit is None:\r\n    512             raise DataJointError('limit is required when offset is set')\r\n--\u003e 513         sql = self.make_sql()\r\n    514         if order_by is not None:\r\n    515             sql += ' ORDER BY ' + ', '.join(order_by)\r\n\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/datajoint/expression.py in make_sql(self, fields)\r\n    111             distinct=\"DISTINCT \" if distinct else \"\",\r\n    112             fields=self.heading.as_sql(fields or self.heading.names),\r\n--\u003e 113             from_=self.from_clause(), where=self.where_clause())\r\n    114 \r\n    115     # --------- query operators -----------\r\n\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/datajoint/expression.py in from_clause(self)\r\n     91             self._subquery_alias_count) if isinstance(src, QueryExpression)\r\n     92             else src for src in self.support)\r\n---\u003e 93         clause = next(support)\r\n     94         for s, left in zip(support, self._left):\r\n     95             clause += ' NATURAL{left} JOIN {clause}'.format(\r\n\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/datajoint/expression.py in (.0)\r\n     88 \r\n     89     def from_clause(self):\r\n---\u003e 90         support = ('(' + src.make_sql() + ') as `$%x`' % next(\r\n     91             self._subquery_alias_count) if isinstance(src, QueryExpression)\r\n     92             else src for src in self.support)\r\n\r\n~/anaconda3/envs/neural-data-kit/lib/python3.8/site-packages/datajoint/expression.py in make_sql(self)\r\n    627             fields = arg1.primary_key\r\n    628             return \"({sql1}) UNION ({sql2})\".format(\r\n--\u003e 629                 sql1=arg1.make_sql(fields),\r\n    630                 sql2=arg2.make_sql(fields))\r\n    631         # with secondary attributes, use union of left join with antijoin\r\n\r\nTypeError: make_sql() takes 1 positional argument but 2 were given\r\n```\r\n\r\n### Expected Behavior\r\nForming the union over two elements of `params` works as expected with the same setup as described above.\r\n\r\nNote: taking the union over more than two tables **does** work for python version 3.8.2 and datajoint version 0.12.6.\r\n","author":{"url":"https://github.com/najjajm","@type":"Person","name":"najjajm"},"datePublished":"2021-05-26T17:58:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/926/datajoint-python/issues/926"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6deeca04-94e2-0221-6d20-da7c5b7bcb69
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id827A:C4224:16C406:1E7332:6A4D94D3
html-safe-noncedd77881fbf20c5a76902188458c56a0e84b13df97e5bdd83b8c1763c6b40ada2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjdBOkM0MjI0OjE2QzQwNjoxRTczMzI6NkE0RDk0RDMiLCJ2aXNpdG9yX2lkIjoiNDkxMDczMjYwMTQ4MjY0NjczOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac00e01dbb7faa532b6252b2ad0f8c54476a130f345a4197a1784fb017de35e2a0
hovercard-subject-tagissue:902754307
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/datajoint/datajoint-python/926/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7565daeb722f4f75a8f5d10d0c6ec136f517f95979bd91812a0e02ef57fa1104/datajoint/datajoint-python/issues/926
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7565daeb722f4f75a8f5d10d0c6ec136f517f95979bd91812a0e02ef57fa1104/datajoint/datajoint-python/issues/926
og:image:altBug Report Description I have a situation where I need to take the union over multiple tables (restriction or other methods will not work in this case). Taking the union over more than two tables t...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamenajjajm
hostnamegithub.com
expected-hostnamegithub.com
None06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33
turbo-cache-controlno-preview
go-importgithub.com/datajoint/datajoint-python git https://github.com/datajoint/datajoint-python.git
octolytics-dimension-user_id2375501
octolytics-dimension-user_logindatajoint
octolytics-dimension-repository_id5866704
octolytics-dimension-repository_nwodatajoint/datajoint-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id5866704
octolytics-dimension-repository_network_root_nwodatajoint/datajoint-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release74e2a9c78f1e38588de4f25885878349d721eedf
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/datajoint/datajoint-python/issues/926#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatajoint%2Fdatajoint-python%2Fissues%2F926
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatajoint%2Fdatajoint-python%2Fissues%2F926
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=datajoint%2Fdatajoint-python
Reloadhttps://github.com/datajoint/datajoint-python/issues/926
Reloadhttps://github.com/datajoint/datajoint-python/issues/926
Reloadhttps://github.com/datajoint/datajoint-python/issues/926
Please reload this pagehttps://github.com/datajoint/datajoint-python/issues/926
datajoint https://github.com/datajoint
datajoint-pythonhttps://github.com/datajoint/datajoint-python
Notifications https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Fork 96 https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Star 194 https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Code https://github.com/datajoint/datajoint-python
Issues 7 https://github.com/datajoint/datajoint-python/issues
Pull requests 4 https://github.com/datajoint/datajoint-python/pulls
Discussions https://github.com/datajoint/datajoint-python/discussions
Actions https://github.com/datajoint/datajoint-python/actions
Security and quality 0 https://github.com/datajoint/datajoint-python/security
Insights https://github.com/datajoint/datajoint-python/pulse
Code https://github.com/datajoint/datajoint-python
Issues https://github.com/datajoint/datajoint-python/issues
Pull requests https://github.com/datajoint/datajoint-python/pulls
Discussions https://github.com/datajoint/datajoint-python/discussions
Actions https://github.com/datajoint/datajoint-python/actions
Security and quality https://github.com/datajoint/datajoint-python/security
Insights https://github.com/datajoint/datajoint-python/pulse
#964https://github.com/datajoint/datajoint-python/pull/964
Cannot form the union of more than two tableshttps://github.com/datajoint/datajoint-python/issues/926#top
#964https://github.com/datajoint/datajoint-python/pull/964
https://github.com/jverswijver
bugIndicates an unexpected problem or unintended behaviorhttps://github.com/datajoint/datajoint-python/issues?q=state%3Aopen%20label%3A%22bug%22
Release 0.13.3https://github.com/datajoint/datajoint-python/milestone/22
https://github.com/najjajm
najjajmhttps://github.com/najjajm
on May 26, 2021https://github.com/datajoint/datajoint-python/issues/926#issue-902754307
jverswijverhttps://github.com/jverswijver
bugIndicates an unexpected problem or unintended behaviorhttps://github.com/datajoint/datajoint-python/issues?q=state%3Aopen%20label%3A%22bug%22
Release 0.13.3https://github.com/datajoint/datajoint-python/milestone/22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.