Tag Archives: join

How to disable Spring/Hibernate/Hazelcast joint cache?

Questions: We use Hazelcast as our Hibernate 2nd level cache manager and we have some configurations for it in our Spring context files. Our code is also instrumented by Spring @Cacheable annotations (for business level cache) and we configured it to use Hazelcast. The problem is that in development environment we have multiple database instances… Read More »

how to join two query result and grouped it by a column

Questions: i have query joined by union and it give me desirable result separately in rows i want to join those two rows and add its values but i don’t know how to do it the query is SELECT `b`.`main_code`, `b`.`account_title`, SUM(CASE WHEN `a`.`type` = ‘CP’ AND `a`.`interactive_person` = ‘6’ AND `a`.`date` BETWEEN ‘2018-02-12’ AND… Read More »

JPA JoinTable keeps on adding distinct

Questions: I’ve got the following tables: table0 tableA tableB tableA has property @ManyToMany @JoinTable(name=’table0′, joinColumns=@JoinColumn(name=’t_id’, referencedColumnName=’id’), inverseJoinColumns=@JoinColumn(…) bes // list of objects from tableB The problem is that when I am trying to fetch list of objects with criteria eg bes.name = ‘abc’ it keeps on sending query with distinct on all fields of tableA… Read More »

SQL – Select the last register in a join

Questions: I need to take the last register in a join, i want only the last record and i have this table: [relObrSocPaciente] idPaciente | idObraSocial| fechaDesde 1 | 1 | 2018-07-29 21:49:46 1 | 2 | 2017-07-29 21:49:46 1 | 3 | 2019-07-30 00:00:00 2 | 3 | 2018-07-30 21:49:46 1 | 4 |… Read More »

Laravel join two tables for ruled out records

Questions: In Laravel, how can I reject a record in a query based on a value with one of the table with which this table has relations? For example, I have the Products table and the Categories table. The Categories table has a one-to-many relationship, one category can have many products. The categories table are… Read More »

Spark leftOuterJoin – Why do the number of tasks increases by factor of 6?

Questions: I’m trying to get an intuitive understanding as to why the number tasks in my Spark application increase when I do a leftOuterJoin… Is it because of the ‘shuffle’? If so could you please explain why? Does the increase in the number of tasks also mean the number of partitions has increased? Answers:

Map or flatmap that works like Array.prototype.join in Javascript

Questions: I find the functionality of Array.prototype.join very useful because it only applies the join value to the “inner” connections of the elements in the array. Like so: [‘Hey’, ‘there’].join(‘-‘) // Hey-there Where Array.protoype.map produces a ‘leftover’ dash in this example: [‘Hey’, ‘there’].map(value => value + ‘-‘) // Hey-there- I’ve been looking for a succinct… Read More »

spring batch multiple input joining

Questions: we’ve got a “special” challenge here which we try to master. We have several csv-files, which are connected via ids. Bit lets keep it simple and talk about just 2 files: persons.csv: 3, john, doe 1, janet, doe 2, chief, programmer addresses.csv: 1, street1, city1 3, street2, city2 2, street3, city3 as you see… Read More »